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

Unified Diff: ui/message_center/views/toast_contents_view.cc

Issue 259253002: Add OnDisplayMetricsChanged in DisplayObserver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@update_orientation
Patch Set: review comments + device scale factor 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: ui/message_center/views/toast_contents_view.cc
diff --git a/ui/message_center/views/toast_contents_view.cc b/ui/message_center/views/toast_contents_view.cc
index 690e694156827f658ab2c4a5ae7a4b3be0b4574e..dc7053e5e54d8c0c779cce9ace18fa92daf42d0f 100644
--- a/ui/message_center/views/toast_contents_view.cc
+++ b/ui/message_center/views/toast_contents_view.cc
@@ -238,8 +238,11 @@ void ToastContentsView::OnDisplayChanged() {
if (!native_view || !collection_.get())
return;
- collection_->OnDisplayBoundsChanged(gfx::Screen::GetScreenFor(
- native_view)->GetDisplayNearestWindow(native_view));
+ const int metrics = gfx::DisplayObserver::DISPLAY_METRICS_BOUNDS |
+ gfx::DisplayObserver::DISPLAY_METRICS_WORK_AREA;
+ collection_->OnDisplayMetricsChanged(gfx::Screen::GetScreenFor(
+ native_view)->GetDisplayNearestWindow(native_view),
+ static_cast<gfx::DisplayObserver::DisplayMetrics>(metrics));
stevenjb 2014/05/09 18:51:33 nit: alignment of this is confusing, maybe add a b
mlamouri (slow - plz ping) 2014/05/12 09:20:16 Sadly, doing that was creating a 83 characters lin
}
void ToastContentsView::OnWorkAreaChanged() {
@@ -251,8 +254,9 @@ void ToastContentsView::OnWorkAreaChanged() {
if (!native_view || !collection_.get())
return;
- collection_->OnDisplayBoundsChanged(gfx::Screen::GetScreenFor(
- native_view)->GetDisplayNearestWindow(native_view));
+ collection_->OnDisplayMetricsChanged(gfx::Screen::GetScreenFor(
+ native_view)->GetDisplayNearestWindow(native_view),
+ gfx::DisplayObserver::DISPLAY_METRICS_WORK_AREA);
stevenjb 2014/05/09 18:51:33 ditto
mlamouri (slow - plz ping) 2014/05/12 09:20:16 Done.
}
// views::View
« no previous file with comments | « ui/message_center/views/message_popup_collection.cc ('k') | ui/views/widget/desktop_aura/desktop_screen_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698