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

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

Issue 12668009: Revert 188217 "Switch Windows to use the MessagePopupCollection" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
« no previous file with comments | « ui/message_center/message_center.h ('k') | no next file » | 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
===================================================================
--- ui/message_center/views/message_popup_collection.cc (revision 188316)
+++ ui/message_center/views/message_popup_collection.cc (working copy)
@@ -47,10 +47,7 @@
views::Widget::InitParams params(
views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
params.keep_on_top = true;
- if (context)
- params.context = context;
- else
- params.top_level = true;
+ params.context = context;
params.transparent = true;
// The origin of the initial bounds are set to (0, 0). It'll then moved by
// MessagePopupCollection.
@@ -149,17 +146,8 @@
return;
}
- gfx::Rect work_area;
- if (!context_) {
- // 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_);
- work_area = screen->GetDisplayNearestWindow(context_).work_area();
- }
+ gfx::Screen* screen = gfx::Screen::GetScreenFor(context_);
+ gfx::Rect work_area = screen->GetDisplayNearestWindow(context_).work_area();
std::set<std::string> old_toast_ids;
for (ToastContainer::iterator iter = toasts_.begin(); iter != toasts_.end();
« no previous file with comments | « ui/message_center/message_center.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698