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

Unified Diff: chrome/browser/ui/views/notifications/balloon_view.cc

Issue 6881107: Rework the way Widget::Init works: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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: chrome/browser/ui/views/notifications/balloon_view.cc
===================================================================
--- chrome/browser/ui/views/notifications/balloon_view.cc (revision 83020)
+++ chrome/browser/ui/views/notifications/balloon_view.cc (working copy)
@@ -316,19 +316,20 @@
gfx::Rect contents_rect = GetContentsRectangle();
html_contents_.reset(new BalloonViewHost(balloon));
html_contents_->SetPreferredSize(gfx::Size(10000, 10000));
+ html_container_ = Widget::CreateWidget();
+ html_container_->SetAlwaysOnTop(true);
Widget::CreateParams params(Widget::CreateParams::TYPE_POPUP);
- params.mirror_origin_in_rtl = false;
- html_container_ = Widget::CreateWidget(params);
- html_container_->SetAlwaysOnTop(true);
- html_container_->Init(NULL, contents_rect);
+ params.bounds = contents_rect;
+ html_container_->Init(params);
html_container_->SetContentsView(html_contents_->view());
gfx::Rect balloon_rect(x(), y(), GetTotalWidth(), GetTotalHeight());
- params.transparent = true;
- frame_container_ = Widget::CreateWidget(params);
+ frame_container_ = Widget::CreateWidget();
frame_container_->set_widget_delegate(this);
frame_container_->SetAlwaysOnTop(true);
- frame_container_->Init(NULL, balloon_rect);
+ params.transparent = true;
+ params.bounds = balloon_rect;
+ frame_container_->Init(params);
frame_container_->SetContentsView(this);
frame_container_->MoveAboveWidget(html_container_);
« no previous file with comments | « chrome/browser/ui/views/native_constrained_window_win.cc ('k') | chrome/browser/ui/views/status_bubble_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698