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

Unified Diff: chrome/browser/ui/views/tab_contents/native_tab_contents_view_win.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/tab_contents/native_tab_contents_view_win.cc
===================================================================
--- chrome/browser/ui/views/tab_contents/native_tab_contents_view_win.cc (revision 83020)
+++ chrome/browser/ui/views/tab_contents/native_tab_contents_view_win.cc (working copy)
@@ -30,9 +30,9 @@
static views::Widget* widget = NULL;
if (!widget) {
+ widget = views::Widget::CreateWidget();
views::Widget::CreateParams params(views::Widget::CreateParams::TYPE_POPUP);
- widget = views::Widget::CreateWidget(params);
- widget->Init(NULL, gfx::Rect());
+ widget->Init(params);
// If a background window requests focus, the hidden tab host will
// be activated to focus the tab. Use WS_DISABLED to prevent
// this.
@@ -72,8 +72,8 @@
void NativeTabContentsViewWin::InitNativeTabContentsView() {
views::Widget::CreateParams params(views::Widget::CreateParams::TYPE_CONTROL);
params.delete_on_destroy = false;
- SetCreateParams(params);
- WidgetWin::Init(GetHiddenTabHostWindow(), gfx::Rect());
+ params.parent = GetHiddenTabHostWindow();
+ GetWidget()->Init(params);
// Remove the root view drop target so we can register our own.
RevokeDragDrop(GetNativeView());
« no previous file with comments | « chrome/browser/ui/views/status_bubble_views.cc ('k') | chrome/browser/ui/views/tab_contents/tab_contents_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698