Moves the display reconfiguration callback into a separate class,

so that it can be shared with the cursor monitor when single monitor capturing
is added (https://webrtc-codereview.appspot.com/4679005/).
This Cl should have no functionality change.

BUG=2253
R=henrike@webrtc.org, sergeyu@chromium.org

Review URL: https://webrtc-codereview.appspot.com/7599004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5461 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
jiayl@webrtc.org
2014-01-29 21:59:12 +00:00
parent 808b99b111
commit cf1b51b6fb
9 changed files with 232 additions and 95 deletions

View File

@ -143,4 +143,22 @@ MacDesktopConfiguration MacDesktopConfiguration::GetCurrent(Origin origin) {
return desktop_config;
}
// For convenience of comparing MacDisplayConfigurations in
// MacDesktopConfiguration::Equals.
bool operator==(const MacDisplayConfiguration& left,
const MacDisplayConfiguration& right) {
return left.id == right.id &&
left.bounds.equals(right.bounds) &&
left.pixel_bounds.equals(right.pixel_bounds) &&
left.dip_to_pixel_scale == right.dip_to_pixel_scale;
}
bool MacDesktopConfiguration::Equals(const MacDesktopConfiguration& other) {
return bounds.equals(other.bounds) &&
pixel_bounds.equals(other.pixel_bounds) &&
dip_to_pixel_scale == other.dip_to_pixel_scale &&
displays == other.displays;
}
} // namespace webrtc