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

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: 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 52b29de74b5433c1a76c43d23ecf8910a01048ee..e9ca48e5c8bd8ecda93e8fb4829331fc61e72122 100644
--- a/ui/message_center/views/toast_contents_view.cc
+++ b/ui/message_center/views/toast_contents_view.cc
@@ -28,6 +28,8 @@
#include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
#endif
+using gfx::Screen;
+
namespace message_center {
namespace {
@@ -243,8 +245,10 @@ void ToastContentsView::OnDisplayChanged() {
if (!native_view || !collection_.get())
return;
- collection_->OnDisplayBoundsChanged(gfx::Screen::GetScreenFor(
- native_view)->GetDisplayNearestWindow(native_view));
+ collection_->OnDisplayMetricsChanged(
+ Screen::GetScreenFor(native_view)->GetDisplayNearestWindow(native_view),
+ gfx::DisplayObserver::DISPLAY_METRIC_BOUNDS |
+ gfx::DisplayObserver::DISPLAY_METRIC_WORK_AREA);
}
void ToastContentsView::OnWorkAreaChanged() {
@@ -256,8 +260,9 @@ void ToastContentsView::OnWorkAreaChanged() {
if (!native_view || !collection_.get())
return;
- collection_->OnDisplayBoundsChanged(gfx::Screen::GetScreenFor(
- native_view)->GetDisplayNearestWindow(native_view));
+ collection_->OnDisplayMetricsChanged(
+ Screen::GetScreenFor(native_view)->GetDisplayNearestWindow(native_view),
+ gfx::DisplayObserver::DISPLAY_METRIC_WORK_AREA);
}
// 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