Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1118)

Unified Diff: media/video/capture/linux/video_capture_device_chromeos.cc

Issue 259253002: Add OnDisplayMetricsChanged in DisplayObserver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@update_orientation
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | ui/gfx/display_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/video/capture/linux/video_capture_device_chromeos.cc
diff --git a/media/video/capture/linux/video_capture_device_chromeos.cc b/media/video/capture/linux/video_capture_device_chromeos.cc
index 40e6eaacfd6204f66f71771808353017558c1281..fd213e0a744103affe2ebb42885f755960764a93 100644
--- a/media/video/capture/linux/video_capture_device_chromeos.cc
+++ b/media/video/capture/linux/video_capture_device_chromeos.cc
@@ -45,13 +45,14 @@ class VideoCaptureDeviceChromeOS::ScreenObserverDelegate
DCHECK(!capture_device_);
}
- // gfx::DisplayObserver:
- virtual void OnDisplayBoundsChanged(const gfx::Display& display) OVERRIDE {
- SendDisplayRotation(display);
- }
-
virtual void OnDisplayAdded(const gfx::Display& /*new_display*/) OVERRIDE {}
virtual void OnDisplayRemoved(const gfx::Display& /*old_display*/) OVERRIDE {}
+ virtual void OnDisplayMetricsChanged(const gfx::Display& display,
+ uint32_t metrics) OVERRIDE {
+ if (!(metrics & DISPLAY_METRIC_ROTATION))
+ return;
+ SendDisplayRotation(display);
+ }
void AddObserverOnUIThread() {
DCHECK(ui_task_runner_->BelongsToCurrentThread());
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | ui/gfx/display_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698