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

Unified Diff: ui/message_center/views/message_popup_collection.h

Issue 19291004: Observes work area change and auto-hide for notifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years, 5 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/message_popup_collection.h
diff --git a/ui/message_center/views/message_popup_collection.h b/ui/message_center/views/message_popup_collection.h
index a407b7f47e1a1defebf61c208bed29b4c04769b9..b77257aae46e951e49b49133f8f1a23c1e243e7e 100644
--- a/ui/message_center/views/message_popup_collection.h
+++ b/ui/message_center/views/message_popup_collection.h
@@ -79,6 +79,14 @@ class MESSAGE_CENTER_EXPORT MessagePopupCollection
// zero. Otherwise, simply waits when it becomes zero.
void DoUpdateIfPossible();
+ // Updates |work_area_| and rearranges the notification toasts if necessary.
+ // This is separated from methods from OnDisplayBoundsChanged(), since
+ // sometimes a work area has to be specified directly. One example is shelf's
+ // auto-hide change. When the shelf in ChromeOS is temporarily shown from auto
+ // hide status, it doesn't change the display's work area but the actual work
+ // area for toasts should be resized.
+ void SetWorkArea(const gfx::Rect& work_area);
+
// Overridden from gfx::DislayObserver:
virtual void OnDisplayBoundsChanged(const gfx::Display& display) OVERRIDE;
virtual void OnDisplayAdded(const gfx::Display& new_display) OVERRIDE;
@@ -128,7 +136,6 @@ class MESSAGE_CENTER_EXPORT MessagePopupCollection
void OnDeferTimerExpired();
// "ForTest" methods.
- void SetWorkAreaForTest(const gfx::Rect& work_area);
views::Widget* GetWidgetForTest(const std::string& id);
void RunLoopForTest();
gfx::Rect GetToastRectAt(size_t index);
« no previous file with comments | « ash/system/web_notification/web_notification_tray.cc ('k') | ui/message_center/views/message_popup_collection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698