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

Unified Diff: ash/touch/touch_hud_debug.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 | « ash/touch/touch_hud_debug.h ('k') | ash/touch/touch_observer_hud.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/touch/touch_hud_debug.cc
diff --git a/ash/touch/touch_hud_debug.cc b/ash/touch/touch_hud_debug.cc
index 983d86bf36f7fef11586cc2b34bc42dcc9905e6c..20fab48588522cc2e61bc44186ee2d6108a32583 100644
--- a/ash/touch/touch_hud_debug.cc
+++ b/ash/touch/touch_hud_debug.cc
@@ -465,10 +465,11 @@ void TouchHudDebug::OnTouchEvent(ui::TouchEvent* event) {
label_container_->SetSize(label_container_->GetPreferredSize());
}
-void TouchHudDebug::OnDisplayBoundsChanged(const gfx::Display& display) {
- TouchObserverHUD::OnDisplayBoundsChanged(display);
+void TouchHudDebug::OnDisplayMetricsChanged(const gfx::Display& display,
+ uint32_t metrics) {
+ TouchObserverHUD::OnDisplayMetricsChanged(display, metrics);
- if (display.id() != display_id())
+ if (display.id() != display_id() || !(metrics & DISPLAY_METRIC_BOUNDS))
return;
const gfx::Size& size = display.size();
canvas_->SetSize(size);
« no previous file with comments | « ash/touch/touch_hud_debug.h ('k') | ash/touch/touch_observer_hud.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698