summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/dom_view.cc
diff options
context:
space:
mode:
authordpolukhin@chromium.org <dpolukhin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-18 12:59:02 +0000
committerdpolukhin@chromium.org <dpolukhin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-18 12:59:02 +0000
commitc0abffca9a64780b88a076bfa8e4fd175d9808c4 (patch)
tree9840df4baea1df5ac25fd4cfcb0e7874f88d77b1 /chrome/browser/views/dom_view.cc
parentb36574a58e05f1d0ac14916dbf014dce2a680ee7 (diff)
downloadchromium_src-c0abffca9a64780b88a076bfa8e4fd175d9808c4.zip
chromium_src-c0abffca9a64780b88a076bfa8e4fd175d9808c4.tar.gz
chromium_src-c0abffca9a64780b88a076bfa8e4fd175d9808c4.tar.bz2
Allow DomView derived classes to substitute TabContents with derived class.
BUG=none TEST=none Review URL: http://codereview.chromium.org/1089002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41948 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/dom_view.cc')
-rw-r--r--chrome/browser/views/dom_view.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/chrome/browser/views/dom_view.cc b/chrome/browser/views/dom_view.cc
index 16a1278..4725cf9 100644
--- a/chrome/browser/views/dom_view.cc
+++ b/chrome/browser/views/dom_view.cc
@@ -22,12 +22,16 @@ bool DOMView::Init(Profile* profile, SiteInstance* instance) {
return true;
initialized_ = true;
- tab_contents_.reset(
- new TabContents(profile, instance, MSG_ROUTING_NONE, NULL));
+ tab_contents_.reset(CreateTabContents(profile, instance));
views::NativeViewHost::Attach(tab_contents_->GetNativeView());
return true;
}
+TabContents* DOMView::CreateTabContents(Profile* profile,
+ SiteInstance* instance) {
+ return new TabContents(profile, instance, MSG_ROUTING_NONE, NULL);
+}
+
void DOMView::LoadURL(const GURL& url) {
DCHECK(initialized_);
tab_contents_->controller().LoadURL(url, GURL(), PageTransition::START_PAGE);