summaryrefslogtreecommitdiffstats
path: root/chrome/common/temp_scaffolding_stubs.cc
diff options
context:
space:
mode:
authoravi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-06 20:12:07 +0000
committeravi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-06 20:12:07 +0000
commitb8615376ec35c6b328ec67325289e0b126f5f4cd (patch)
treed93d9ab0f28bdb48abfcdfbc0500b75d20369367 /chrome/common/temp_scaffolding_stubs.cc
parent3ddb7b91615c7c81d6723c061c106b430294b05f (diff)
downloadchromium_src-b8615376ec35c6b328ec67325289e0b126f5f4cd.zip
chromium_src-b8615376ec35c6b328ec67325289e0b126f5f4cd.tar.gz
chromium_src-b8615376ec35c6b328ec67325289e0b126f5f4cd.tar.bz2
Initial Mac port of web_contents_view and render_widget_host_view.
Review URL: http://codereview.chromium.org/20124 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9330 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/temp_scaffolding_stubs.cc')
-rw-r--r--chrome/common/temp_scaffolding_stubs.cc32
1 files changed, 12 insertions, 20 deletions
diff --git a/chrome/common/temp_scaffolding_stubs.cc b/chrome/common/temp_scaffolding_stubs.cc
index 661f632..b79214f 100644
--- a/chrome/common/temp_scaffolding_stubs.cc
+++ b/chrome/common/temp_scaffolding_stubs.cc
@@ -166,13 +166,22 @@ void Browser::LoadingStateChanged(TabContents* source) {
TabContents* TabContents::CreateWithType(TabContentsType type,
Profile* profile,
SiteInstance* instance) {
+ TabContents* contents;
+
switch (type) {
case TAB_CONTENTS_WEB:
- return new WebContents(profile, instance, NULL, MSG_ROUTING_NONE, NULL);
+ contents = new WebContents(profile, instance, NULL, MSG_ROUTING_NONE,
+ NULL);
+ break;
default:
- NOTIMPLEMENTED();
- return NULL;
+ NOTREACHED() << "Don't know how to create tab contents of type " << type;
+ contents = NULL;
}
+
+ if (contents)
+ contents->CreateView();
+
+ return contents;
}
void TabContents::SetupController(Profile* profile) {
@@ -213,23 +222,6 @@ void TabContents::Destroy() {
//--------------------------------------------------------------------------
-#if defined(OS_MACOSX)
-class RenderWidgetHostViewStub : public RenderWidgetHostView {
- public:
- RenderWidgetHostViewStub(RenderWidgetHost* host) {
- host->set_view(this);
- }
-};
-
-RenderWidgetHostView*
- WebContentsView::CreateViewForWidget(RenderWidgetHost* host) {
- NOTIMPLEMENTED();
- return new RenderWidgetHostViewStub(host);
-}
-#endif // defined(OS_MACOSX)
-
-//--------------------------------------------------------------------------
-
bool RLZTracker::GetAccessPointRlz(AccessPoint point, std::wstring* rlz) {
NOTIMPLEMENTED();
return false;