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

Unified Diff: ui/message_center/views/message_popup_collection.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 | « ui/message_center/views/message_popup_collection.h ('k') | ui/message_center/views/toast_contents_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/views/message_popup_collection.cc
diff --git a/ui/message_center/views/message_popup_collection.cc b/ui/message_center/views/message_popup_collection.cc
index 4dd70a47128b9b0cefa16addbc37a5c531cfb362..d1116d6f3464c4807448b30f638b2d966f15dac5 100644
--- a/ui/message_center/views/message_popup_collection.cc
+++ b/ui/message_center/views/message_popup_collection.cc
@@ -561,14 +561,6 @@ void MessagePopupCollection::SetDisplayInfo(const gfx::Rect& work_area,
RepositionWidgets();
}
-void MessagePopupCollection::OnDisplayBoundsChanged(
- const gfx::Display& display) {
- if (display.id() != display_id_)
- return;
-
- SetDisplayInfo(display.work_area(), display.bounds());
-}
-
void MessagePopupCollection::OnDisplayAdded(const gfx::Display& new_display) {
}
@@ -580,6 +572,15 @@ void MessagePopupCollection::OnDisplayRemoved(const gfx::Display& old_display) {
}
}
+void MessagePopupCollection::OnDisplayMetricsChanged(
+ const gfx::Display& display, uint32_t metrics) {
+ if (display.id() != display_id_)
+ return;
+
+ if (metrics & DISPLAY_METRIC_BOUNDS || metrics & DISPLAY_METRIC_WORK_AREA)
+ SetDisplayInfo(display.work_area(), display.bounds());
+}
+
views::Widget* MessagePopupCollection::GetWidgetForTest(const std::string& id)
const {
for (Toasts::const_iterator iter = toasts_.begin(); iter != toasts_.end();
« no previous file with comments | « ui/message_center/views/message_popup_collection.h ('k') | ui/message_center/views/toast_contents_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698