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

Unified Diff: ash/touch/touch_observer_hud.cc

Issue 259253002: Add OnDisplayMetricsChanged in DisplayObserver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@update_orientation
Patch Set: with Linux Aura tests 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
Index: ash/touch/touch_observer_hud.cc
diff --git a/ash/touch/touch_observer_hud.cc b/ash/touch/touch_observer_hud.cc
index 60924a517b4d7298796c3aca8c2c48344ca5bf10..a870634228e41a68f0691ff3e601f2ad1c8f4329 100644
--- a/ash/touch/touch_observer_hud.cc
+++ b/ash/touch/touch_observer_hud.cc
@@ -86,12 +86,6 @@ void TouchObserverHUD::OnWidgetDestroying(views::Widget* widget) {
delete this;
}
-void TouchObserverHUD::OnDisplayBoundsChanged(const gfx::Display& display) {
- if (display.id() != display_id_)
- return;
- widget_->SetSize(display.size());
-}
-
void TouchObserverHUD::OnDisplayAdded(const gfx::Display& new_display) {}
void TouchObserverHUD::OnDisplayRemoved(const gfx::Display& old_display) {
@@ -100,6 +94,14 @@ void TouchObserverHUD::OnDisplayRemoved(const gfx::Display& old_display) {
widget_->CloseNow();
}
+void TouchObserverHUD::OnDisplayMetricsChanged(
+ const gfx::Display& display, DisplayObserver::MetricsType metrics) {
+ if (display.id() != display_id_ || !(metrics & DISPLAY_METRICS_BOUNDS))
+ return;
+
+ widget_->SetSize(display.size());
+}
+
#if defined(OS_CHROMEOS)
void TouchObserverHUD::OnDisplayModeChanged(
const ui::DisplayConfigurator::DisplayStateList& outputs) {

Powered by Google App Engine
This is Rietveld 408576698