diff options
author | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-27 14:20:35 +0000 |
---|---|---|
committer | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-27 14:20:35 +0000 |
commit | c62c75750f27acc86c0505d66837a72755aeb5bf (patch) | |
tree | bcedb0dfd21b6dfb30d59fb7434909ab3d97378c | |
parent | 6c85aa0142643695b48b76e6f1e02f58d191e712 (diff) | |
download | chromium_src-c62c75750f27acc86c0505d66837a72755aeb5bf.zip chromium_src-c62c75750f27acc86c0505d66837a72755aeb5bf.tar.gz chromium_src-c62c75750f27acc86c0505d66837a72755aeb5bf.tar.bz2 |
Enable new tab page for Mac and Linux
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10604 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/dom_ui/dom_ui_contents.cc | 7 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_contents_factory.cc | 5 | ||||
-rw-r--r-- | chrome/common/temp_scaffolding_stubs.h | 2 |
3 files changed, 8 insertions, 6 deletions
diff --git a/chrome/browser/dom_ui/dom_ui_contents.cc b/chrome/browser/dom_ui/dom_ui_contents.cc index 68b05d9..6fd749f 100644 --- a/chrome/browser/dom_ui/dom_ui_contents.cc +++ b/chrome/browser/dom_ui/dom_ui_contents.cc @@ -233,12 +233,13 @@ const std::string DOMUIContents::GetScheme() { } DOMUI* DOMUIContents::GetDOMUIForURL(const GURL &url) { -#if defined(OS_WIN) -// TODO(port): include this once these are converted to HTML if (url.host() == NewTabUI::GetBaseURL().host() || url.SchemeIs(chrome::kChromeInternalScheme)) { return new NewTabUI(this); - } else if (url.host() == HistoryUI::GetBaseURL().host()) { + } +#if defined(OS_WIN) +// TODO(port): include this once these are converted to HTML + if (url.host() == HistoryUI::GetBaseURL().host()) { return new HistoryUI(this); } else if (url.host() == DownloadsUI::GetBaseURL().host()) { return new DownloadsUI(this); diff --git a/chrome/browser/tab_contents/tab_contents_factory.cc b/chrome/browser/tab_contents/tab_contents_factory.cc index a65d9de..9297eec 100644 --- a/chrome/browser/tab_contents/tab_contents_factory.cc +++ b/chrome/browser/tab_contents/tab_contents_factory.cc @@ -60,12 +60,12 @@ TabContents* TabContents::CreateWithType(TabContentsType type, case TAB_CONTENTS_NATIVE_UI: contents = new NativeUIContents(profile); break; +#endif // defined(OS_WIN) case TAB_CONTENTS_DEBUGGER: case TAB_CONTENTS_NEW_TAB_UI: case TAB_CONTENTS_DOM_UI: contents = new DOMUIContents(profile, instance, NULL); break; -#endif // defined(OS_WIN) default: if (g_extra_types) { TabContentsFactoryMap::const_iterator it = g_extra_types->find(type); @@ -114,13 +114,14 @@ TabContentsType TabContents::TypeForURL(GURL* url) { if (url->SchemeIs(DOMUIContents::GetScheme().c_str())) return TAB_CONTENTS_DOM_UI; - #elif defined(OS_POSIX) TabContentsType type(TAB_CONTENTS_UNKNOWN_TYPE); if (BrowserURLHandler::HandleBrowserURL(url, &type) && type == TAB_CONTENTS_ABOUT_UI) { return type; } + if (url->SchemeIs(DOMUIContents::GetScheme().c_str())) + return TAB_CONTENTS_DOM_UI; NOTIMPLEMENTED(); #endif diff --git a/chrome/common/temp_scaffolding_stubs.h b/chrome/common/temp_scaffolding_stubs.h index 1058d2d..add5e75 100644 --- a/chrome/common/temp_scaffolding_stubs.h +++ b/chrome/common/temp_scaffolding_stubs.h @@ -485,7 +485,7 @@ class TabContents : public PageNavigator, public NotificationObserver { int32 GetMaxPageID(); void UpdateMaxPageID(int32); virtual bool NavigateToPendingEntry(bool) { NOTIMPLEMENTED(); return true; } - virtual DOMUIHost* AsDOMUIHost() { NOTIMPLEMENTED(); return NULL; } + virtual DOMUIHost* AsDOMUIHost() { return NULL; } virtual std::wstring GetStatusText() const { return std::wstring(); } static void RegisterUserPrefs(PrefService* prefs) { prefs->RegisterBooleanPref(prefs::kBlockPopups, false); |