Index: views/widget/native_widget_views.cc |
=================================================================== |
--- views/widget/native_widget_views.cc (revision 86488) |
+++ views/widget/native_widget_views.cc (working copy) |
@@ -4,33 +4,18 @@ |
#include "views/widget/native_widget_views.h" |
-#include "ui/gfx/canvas.h" |
#include "views/view.h" |
+#include "views/widget/native_widget_view.h" |
namespace views { |
//////////////////////////////////////////////////////////////////////////////// |
-// NativeWidgetViews::NativeWidgetView: |
- |
-class NativeWidgetViews::NativeWidgetView : public View { |
- public: |
- NativeWidgetView() {} |
- virtual ~NativeWidgetView() {} |
- |
- // Overridden from View: |
- virtual void OnPaint(gfx::Canvas* canvas) { |
- canvas->FillRectInt(SK_ColorRED, 0, 0, width(), height()); |
- } |
- |
- private: |
- DISALLOW_COPY_AND_ASSIGN(NativeWidgetView); |
-}; |
- |
-//////////////////////////////////////////////////////////////////////////////// |
// NativeWidgetViews, public: |
-NativeWidgetViews::NativeWidgetViews(internal::NativeWidgetDelegate* delegate) |
+NativeWidgetViews::NativeWidgetViews(View* host, |
+ internal::NativeWidgetDelegate* delegate) |
: delegate_(delegate), |
+ host_view_(host), |
view_(NULL), |
ALLOW_THIS_IN_INITIALIZER_LIST(close_widget_factory_(this)) { |
} |
@@ -46,7 +31,8 @@ |
// NativeWidgetViews, NativeWidget implementation: |
void NativeWidgetViews::InitNativeWidget(const Widget::InitParams& params) { |
- view_ = new NativeWidgetView; |
+ view_ = new internal::NativeWidgetView(this); |
+ host_view_->AddChildView(view_); |
// TODO(beng): handle parenting. |
// TODO(beng): SetInitParams(). |