diff --git a/brightray/browser/win/inspectable_web_contents_view_win.cc b/brightray/browser/win/inspectable_web_contents_view_win.cc index 00c661c22b2d..65b9ff176032 100644 --- a/brightray/browser/win/inspectable_web_contents_view_win.cc +++ b/brightray/browser/win/inspectable_web_contents_view_win.cc @@ -23,6 +23,7 @@ class ContainerView : public views::View { : container_view_created_(false), web_view_(new views::WebView(NULL)), web_contents_view_(web_contents_view) { + set_owned_by_client(); web_view_->SetWebContents( web_contents_view_->inspectable_web_contents()->GetWebContents()); } @@ -69,7 +70,7 @@ InspectableWebContentsViewWin::~InspectableWebContentsViewWin() { } views::View* InspectableWebContentsViewWin::GetView() const { - return container_; + return container_.get(); } gfx::NativeView InspectableWebContentsViewWin::GetNativeView() const { diff --git a/brightray/browser/win/inspectable_web_contents_view_win.h b/brightray/browser/win/inspectable_web_contents_view_win.h index 382a0f460298..5548f8ce75c2 100644 --- a/brightray/browser/win/inspectable_web_contents_view_win.h +++ b/brightray/browser/win/inspectable_web_contents_view_win.h @@ -4,6 +4,7 @@ #include "browser/inspectable_web_contents_view.h" #include "base/compiler_specific.h" +#include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" namespace views { @@ -38,7 +39,7 @@ class InspectableWebContentsViewWin : public InspectableWebContentsView { // Owns us. InspectableWebContentsImpl* inspectable_web_contents_; - ContainerView* container_; + scoped_ptr container_; base::WeakPtr devtools_window_;