diff options
Diffstat (limited to 'views/controls/native/native_view_host.cc')
-rw-r--r-- | views/controls/native/native_view_host.cc | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/views/controls/native/native_view_host.cc b/views/controls/native/native_view_host.cc index 0981b9d..e8c5710 100644 --- a/views/controls/native/native_view_host.cc +++ b/views/controls/native/native_view_host.cc @@ -6,7 +6,6 @@ #include "base/logging.h" #include "ui/gfx/canvas.h" -#include "views/controls/native/native_view_host_views.h" #include "views/controls/native/native_view_host_wrapper.h" #include "views/widget/widget.h" @@ -29,7 +28,6 @@ const bool NativeViewHost::kRenderNativeControlFocus = true; NativeViewHost::NativeViewHost() : native_view_(NULL), - views_view_(NULL), fast_resize_(false), fast_resize_at_last_layout_(false), focus_view_(NULL) { @@ -41,7 +39,6 @@ NativeViewHost::~NativeViewHost() { void NativeViewHost::Attach(gfx::NativeView native_view) { DCHECK(native_view); DCHECK(!native_view_); - DCHECK(!views_view_); native_view_ = native_view; // If set_focus_view() has not been invoked, this view is the one that should // be seen as focused when the native view receives focus. @@ -50,21 +47,6 @@ void NativeViewHost::Attach(gfx::NativeView native_view) { native_wrapper_->NativeViewAttached(); } -void NativeViewHost::AttachToView(View* view) { - if (view == views_view_) - return; - DCHECK(view); - DCHECK(!native_view_); - DCHECK(!views_view_); - native_wrapper_.reset(new NativeViewHostViews(this)); - views_view_ = view; - // If set_focus_view() has not been invoked, this view is the one that should - // be seen as focused when the native view receives focus. - if (!focus_view_) - focus_view_ = this; - native_wrapper_->NativeViewAttached(); -} - void NativeViewHost::Detach() { Detach(false); } @@ -88,7 +70,7 @@ gfx::Size NativeViewHost::GetPreferredSize() { } void NativeViewHost::Layout() { - if ((!native_view_ && !views_view_) || !native_wrapper_.get()) + if (!native_view_ || !native_wrapper_.get()) return; gfx::Rect vis_bounds = GetVisibleBounds(); @@ -197,10 +179,9 @@ gfx::NativeViewAccessible NativeViewHost::GetNativeViewAccessible() { // NativeViewHost, private: void NativeViewHost::Detach(bool destroyed) { - if (native_view_ || views_view_) { + if (native_view_) { native_wrapper_->NativeViewDetaching(destroyed); native_view_ = NULL; - views_view_ = NULL; } } |