diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-18 19:52:40 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-18 19:52:40 +0000 |
commit | 1ef5ad42064c8ef0d1503b68a7fbac01887ca093 (patch) | |
tree | 34a32b11a9db6f69fef27e7e81863d82a29bcd2d /chrome/browser/views/dom_view.cc | |
parent | 59b49a66c3cd959fcf9d7b4bd9c6d88c70b39919 (diff) | |
download | chromium_src-1ef5ad42064c8ef0d1503b68a7fbac01887ca093.zip chromium_src-1ef5ad42064c8ef0d1503b68a7fbac01887ca093.tar.gz chromium_src-1ef5ad42064c8ef0d1503b68a7fbac01887ca093.tar.bz2 |
Reverting 14005.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14006 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/dom_view.cc')
-rw-r--r-- | chrome/browser/views/dom_view.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/chrome/browser/views/dom_view.cc b/chrome/browser/views/dom_view.cc index ffa9c1d..3e1c777 100644 --- a/chrome/browser/views/dom_view.cc +++ b/chrome/browser/views/dom_view.cc @@ -11,8 +11,11 @@ DOMView::DOMView() : initialized_(false), web_contents_(NULL) { } DOMView::~DOMView() { - if (web_contents_.get()) + if (web_contents_) { Detach(); + web_contents_->Destroy(); + web_contents_ = NULL; + } } bool DOMView::Init(Profile* profile, SiteInstance* instance) { @@ -20,13 +23,13 @@ bool DOMView::Init(Profile* profile, SiteInstance* instance) { return true; initialized_ = true; - web_contents_.reset(new WebContents(profile, instance, - MSG_ROUTING_NONE, NULL)); + web_contents_ = new WebContents(profile, instance, MSG_ROUTING_NONE, NULL); views::HWNDView::Attach(web_contents_->GetNativeView()); + web_contents_->SetupController(profile); return true; } void DOMView::LoadURL(const GURL& url) { DCHECK(initialized_); - web_contents_->controller().LoadURL(url, GURL(), PageTransition::START_PAGE); + web_contents_->controller()->LoadURL(url, GURL(), PageTransition::START_PAGE); } |