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

Unified Diff: views/widget/widget.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
« no previous file with comments | « views/widget/widget.h ('k') | views/widget/widget_gtk.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/widget.cc
===================================================================
--- views/widget/widget.cc (revision 83020)
+++ views/widget/widget.cc (working copy)
@@ -28,6 +28,8 @@
delete_on_destroy(true),
mirror_origin_in_rtl(false),
has_dropshadow(false),
+ parent(NULL),
+ parent_widget(NULL),
native_widget(NULL) {
}
@@ -41,12 +43,19 @@
delete_on_destroy(true),
mirror_origin_in_rtl(false),
has_dropshadow(false),
+ parent(NULL),
+ parent_widget(NULL),
native_widget(NULL) {
}
////////////////////////////////////////////////////////////////////////////////
// Widget, public:
+// static
+Widget::CreateParams Widget::WindowCreateParams() {
+ return CreateParams(CreateParams::TYPE_WINDOW);
+}
+
Widget::Widget()
: is_mouse_button_pressed_(false),
last_mouse_event_was_move_(false),
@@ -58,19 +67,13 @@
Widget::~Widget() {
}
-void Widget::SetCreateParams(const CreateParams& params) {
- native_widget_->SetCreateParams(params);
-}
-
-// Unconverted methods (see header) --------------------------------------------
-
-void Widget::Init(gfx::NativeView parent, const gfx::Rect& bounds) {
+void Widget::Init(const CreateParams& params) {
GetRootView();
default_theme_provider_.reset(new DefaultThemeProvider);
+ native_widget_->InitNativeWidget(params);
}
-void Widget::InitWithWidget(Widget* parent, const gfx::Rect& bounds) {
-}
+// Unconverted methods (see header) --------------------------------------------
gfx::NativeView Widget::GetNativeView() const {
return NULL;
« no previous file with comments | « views/widget/widget.h ('k') | views/widget/widget_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698