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

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

Issue 12667018: Switch Windows to use the MessagePopupCollection (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Better comments. Created 7 years, 9 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.cc
diff --git a/ui/message_center/views/message_popup_collection.cc b/ui/message_center/views/message_popup_collection.cc
index c67bc3d2b926fb62a9d933a9eb0c060a89880e5e..2e75021274fec854ff436e94521038f756bfb96a 100644
--- a/ui/message_center/views/message_popup_collection.cc
+++ b/ui/message_center/views/message_popup_collection.cc
@@ -146,8 +146,17 @@ void MessagePopupCollection::UpdatePopups() {
return;
}
+ gfx::Rect work_area;
+#if defined(OS_WIN) && defined(USE_AURA)
+ // On Win+Aura, we don't have a context since the popups currently show up on
+ // the Windows desktop, not in the Aura/Ash desktop. This code will display
+ // the popups on the primary display.
+ gfx::Screen* screen = gfx::Screen::GetNativeScreen();
+ work_area = screen->GetPrimaryDisplay().work_area();
+#else
gfx::Screen* screen = gfx::Screen::GetScreenFor(context_);
- gfx::Rect work_area = screen->GetDisplayNearestWindow(context_).work_area();
+ work_area = screen->GetDisplayNearestWindow(context_).work_area();
+#endif
std::set<std::string> old_toast_ids;
for (ToastContainer::iterator iter = toasts_.begin(); iter != toasts_.end();

Powered by Google App Engine
This is Rietveld 408576698