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

Side by Side Diff: chrome/browser/ui/views/message_center/message_center_widget_delegate.cc

Issue 282133005: Removes unnecessary views::Widget::InitParams::top_level (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/message_center/message_center_widget_delegate. h" 5 #include "chrome/browser/ui/views/message_center/message_center_widget_delegate. h"
6 6
7 #include <complex> 7 #include <complex>
8 8
9 #include "chrome/browser/ui/views/message_center/message_center_frame_view.h" 9 #include "chrome/browser/ui/views/message_center/message_center_frame_view.h"
10 #include "chrome/browser/ui/views/message_center/web_notification_tray.h" 10 #include "chrome/browser/ui/views/message_center/web_notification_tray.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 tray_->SendHideMessageCenter(); 135 tray_->SendHideMessageCenter();
136 return true; 136 return true;
137 } 137 }
138 138
139 void MessageCenterWidgetDelegate::InitWidget() { 139 void MessageCenterWidgetDelegate::InitWidget() {
140 views::Widget* widget = new views::Widget(); 140 views::Widget* widget = new views::Widget();
141 views::Widget::InitParams params(views::Widget::InitParams::TYPE_BUBBLE); 141 views::Widget::InitParams params(views::Widget::InitParams::TYPE_BUBBLE);
142 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; 142 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
143 params.delegate = this; 143 params.delegate = this;
144 params.keep_on_top = true; 144 params.keep_on_top = true;
145 params.top_level = true;
146 #if defined(USE_ASH) 145 #if defined(USE_ASH)
147 // This class is not used in Ash; there is another container for the message 146 // This class is not used in Ash; there is another container for the message
148 // center that's used there. So, we must be in a Views + Ash environment. We 147 // center that's used there. So, we must be in a Views + Ash environment. We
149 // want the notification center to be available on both desktops. Setting the 148 // want the notification center to be available on both desktops. Setting the
150 // |native_widget| variable here ensures that the widget is hosted on the 149 // |native_widget| variable here ensures that the widget is hosted on the
151 // native desktop. 150 // native desktop.
152 params.native_widget = new views::DesktopNativeWidgetAura(widget); 151 params.native_widget = new views::DesktopNativeWidgetAura(widget);
153 #endif 152 #endif
154 widget->Init(params); 153 widget->Init(params);
155 154
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 bounds.set_y(corrected_anchor.y() - size.height()); 234 bounds.set_y(corrected_anchor.y() - size.height());
236 if (pos_info_.message_center_alignment & ALIGNMENT_LEFT) 235 if (pos_info_.message_center_alignment & ALIGNMENT_LEFT)
237 bounds.set_x(corrected_anchor.x()); 236 bounds.set_x(corrected_anchor.x());
238 if (pos_info_.message_center_alignment & ALIGNMENT_RIGHT) 237 if (pos_info_.message_center_alignment & ALIGNMENT_RIGHT)
239 bounds.set_x(corrected_anchor.x() - size.width()); 238 bounds.set_x(corrected_anchor.x() - size.width());
240 239
241 return bounds; 240 return bounds;
242 } 241 }
243 242
244 } // namespace message_center 243 } // namespace message_center
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/chrome_views_delegate_aura.cc ('k') | chrome/browser/ui/views/screen_capture_notification_ui_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698