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

Unified Diff: chrome/browser/ui/views/tab_contents/tab_contents_view_gtk.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/tab_contents_view_gtk.cc
===================================================================
--- chrome/browser/ui/views/tab_contents/tab_contents_view_gtk.cc (revision 83020)
+++ chrome/browser/ui/views/tab_contents/tab_contents_view_gtk.cc (working copy)
@@ -103,7 +103,6 @@
TabContentsViewGtk::TabContentsViewGtk(TabContents* tab_contents)
: TabContentsView(tab_contents),
- views::WidgetGtk(TYPE_CHILD),
sad_tab_(NULL),
ignore_next_char_event_(false) {
drag_source_.reset(new TabContentsDragSource(this));
@@ -150,9 +149,10 @@
}
void TabContentsViewGtk::CreateView(const gfx::Size& initial_size) {
- set_delete_on_destroy(false);
- WidgetGtk::Init(NULL, gfx::Rect(0, 0, initial_size.width(),
- initial_size.height()));
+ views::Widget::CreateParams params(views::Widget::CreateParams::TYPE_CONTROL);
+ params.delete_on_destroy = false;
+ params.bounds = gfx::Rect(initial_size);
+ GetWidget()->Init(params);
// We need to own the widget in order to attach/detach the native view
// to container.
gtk_object_ref(GTK_OBJECT(GetNativeView()));

Powered by Google App Engine
This is Rietveld 408576698