ContainerView should manage itself.
This commit is contained in:
parent
b0374b6a1d
commit
566022cb66
2 changed files with 4 additions and 2 deletions
|
@ -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 {
|
||||
|
|
|
@ -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<ContainerView> container_;
|
||||
|
||||
base::WeakPtr<DevToolsWindow> devtools_window_;
|
||||
|
||||
|
|
Loading…
Reference in a new issue