diff options
author | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-25 14:02:12 +0000 |
---|---|---|
committer | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-25 14:02:12 +0000 |
commit | 1fe8d83df42e5e80db2fd9d092a282881fbb1dce (patch) | |
tree | caa489a63c532d372f4957bf0712a95bffcb536e | |
parent | 6d4480b50022d0eaee080b86be3a304a46b0454d (diff) | |
download | chromium_src-1fe8d83df42e5e80db2fd9d092a282881fbb1dce.zip chromium_src-1fe8d83df42e5e80db2fd9d092a282881fbb1dce.tar.gz chromium_src-1fe8d83df42e5e80db2fd9d092a282881fbb1dce.tar.bz2 |
Add "new tab" ui to the build and remove some of the scaffolding. Fix compatibility issues with GCC.
Review URL: http://codereview.chromium.org/28088
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10333 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/browser.scons | 1 | ||||
-rw-r--r-- | chrome/browser/dom_ui/dom_ui_contents.cc | 5 | ||||
-rw-r--r-- | chrome/browser/dom_ui/new_tab_ui.cc | 17 | ||||
-rw-r--r-- | chrome/chrome.xcodeproj/project.pbxproj | 17 | ||||
-rw-r--r-- | chrome/common/temp_scaffolding_stubs.cc | 24 |
5 files changed, 43 insertions, 21 deletions
diff --git a/chrome/browser/browser.scons b/chrome/browser/browser.scons index 030a3fa..1079f91 100644 --- a/chrome/browser/browser.scons +++ b/chrome/browser/browser.scons @@ -677,7 +677,6 @@ if not env.Bit('windows'): 'chrome_plugin_host.cc', 'dock_info.cc', 'dom_ui/html_dialog_contents.cc', - 'dom_ui/new_tab_ui.cc', 'download/download_exe.cc', 'download/download_util.cc', 'drag_utils.cc', diff --git a/chrome/browser/dom_ui/dom_ui_contents.cc b/chrome/browser/dom_ui/dom_ui_contents.cc index 89c35f2..8e401a0 100644 --- a/chrome/browser/dom_ui/dom_ui_contents.cc +++ b/chrome/browser/dom_ui/dom_ui_contents.cc @@ -191,10 +191,15 @@ bool DOMUIContents::NavigateToPendingEntry(bool reload) { } DOMUI* DOMUIContents::GetDOMUIForURL(const GURL &url) { +#if defined(OS_WIN) +// TODO(port): Include when history and downloads are HTML UI. if (url.host() == HistoryUI::GetBaseURL().host()) return new HistoryUI(this); else if (url.host() == DownloadsUI::GetBaseURL().host()) return new DownloadsUI(this); +#else + NOTIMPLEMENTED(); +#endif return NULL; } diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc index e0cfd44..bcee162 100644 --- a/chrome/browser/dom_ui/new_tab_ui.cc +++ b/chrome/browser/dom_ui/new_tab_ui.cc @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "build/build_config.h" + #include "chrome/browser/dom_ui/new_tab_ui.h" #include "base/histogram.h" @@ -10,7 +12,10 @@ #include "chrome/browser/browser.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/dom_ui/dom_ui_contents.h" +#if defined(OS_WIN) +// TODO(port): include this once history is converted to HTML #include "chrome/browser/history_tab_ui.h" +#endif #include "chrome/browser/history/page_usage_data.h" #include "chrome/browser/metrics/user_metrics.h" #include "chrome/browser/profile.h" @@ -585,7 +590,7 @@ void RecentlyClosedTabsHandler::HandleReopenTab(const Value* content) { static_cast<const StringValue*>(list_member); std::wstring wstring_value; if (string_value->GetAsString(&wstring_value)) { - int session_to_restore = _wtoi(wstring_value.c_str()); + int session_to_restore = StringToInt(wstring_value); tab_restore_service_->RestoreEntryById(browser, session_to_restore, true); // The current tab has been nuked at this point; don't touch any member @@ -705,9 +710,14 @@ HistoryHandler::HistoryHandler(DOMUIHost* dom_ui_host) void HistoryHandler::HandleShowHistoryPage(const Value*) { NavigationController* controller = dom_ui_host_->controller(); if (controller) { +#if defined(OS_WIN) +// TODO(port): include this once history is converted to HTML controller->LoadURL(HistoryTabUI::GetURL(), GURL(), PageTransition::LINK); UserMetrics::RecordAction(L"NTP_ShowHistory", dom_ui_host_->profile()); +#else + NOTIMPLEMENTED(); +#endif } } @@ -724,11 +734,16 @@ void HistoryHandler::HandleSearchHistoryPage(const Value* content) { UserMetrics::RecordAction(L"NTP_SearchHistory", dom_ui_host_->profile()); +#if defined(OS_WIN) +// TODO(port): include this once history is converted to HTML NavigationController* controller = dom_ui_host_->controller(); controller->LoadURL( HistoryTabUI::GetHistoryURLWithSearchText(wstring_value), GURL(), PageTransition::LINK); +#else + NOTIMPLEMENTED(); +#endif } } } diff --git a/chrome/chrome.xcodeproj/project.pbxproj b/chrome/chrome.xcodeproj/project.pbxproj index 7dc429d..68b6dcc 100644 --- a/chrome/chrome.xcodeproj/project.pbxproj +++ b/chrome/chrome.xcodeproj/project.pbxproj @@ -562,6 +562,7 @@ E48FB9870EC4EBA10052B72B /* safe_browsing_database_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D7BFAE40E9D49DE009A6919 /* safe_browsing_database_unittest.cc */; }; E4A3EB130F4EFCF400596CC2 /* grow_box_view.m in Sources */ = {isa = PBXBuildFile; fileRef = E4A3EB120F4EFCF400596CC2 /* grow_box_view.m */; }; E4A3EB390F4EFF4D00596CC2 /* grow_box.png in Resources */ = {isa = PBXBuildFile; fileRef = E4A3EB380F4EFF4D00596CC2 /* grow_box.png */; }; + E4BD52C30F548EBD00591DFA /* new_tab_ui.cc in Sources */ = {isa = PBXBuildFile; fileRef = E4BD520E0F53596600591DFA /* new_tab_ui.cc */; }; E4DCDB9D0F4091C00084059A /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4DCDB9C0F4091BF0084059A /* ApplicationServices.framework */; }; E4DCDC8F0F4091F30084059A /* libWebKitSystemInterfaceLeopard.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4DCDC8E0F4091F30084059A /* libWebKitSystemInterfaceLeopard.a */; }; E4DCDC900F40929C0084059A /* libglue.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 826850180F2FC82E009F6555 /* libglue.a */; }; @@ -1852,6 +1853,13 @@ remoteGlobalIDString = 7B262E830E82E5D7001CE27F; remoteInfo = libevent; }; + E4BD53D80F54AB4300591DFA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 826850040F2FC82D009F6555 /* webkit.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 937A16010F53326C003E8D2D; + remoteInfo = webkit; + }; E4F3259A0EE837DD002533CE /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 4D7BF2E90E9D46A4009A6919 /* Project object */; @@ -4020,6 +4028,7 @@ 8268501E0F2FC82E009F6555 /* libport.a */, 826850200F2FC82E009F6555 /* libwebcore.a */, 826850220F2FC82E009F6555 /* libwebcoresysteminterface.a */, + E4BD53D90F54AB4300591DFA /* libwebkit.a */, 826850240F2FC82E009F6555 /* libwtf.a */, ); name = Products; @@ -5233,6 +5242,13 @@ remoteRef = ABFA33890F424EC5008FCF5D /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; + E4BD53D90F54AB4300591DFA /* libwebkit.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libwebkit.a; + remoteRef = E4BD53D80F54AB4300591DFA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ @@ -5554,6 +5570,7 @@ E45075CD0F150741003BE099 /* mork_reader.cc in Sources */, E434C3740F3A464400B665C7 /* navigation_controller.cc in Sources */, E434BBAA0F37D4EA00B665C7 /* navigation_entry.cc in Sources */, + E4BD52C30F548EBD00591DFA /* new_tab_ui.cc in Sources */, 4D7BFABB0E9D49C1009A6919 /* page_number.cc in Sources */, 4D7BFAC60E9D49CB009A6919 /* page_range.cc in Sources */, 4D7BFAC40E9D49C6009A6919 /* page_setup.cc in Sources */, diff --git a/chrome/common/temp_scaffolding_stubs.cc b/chrome/common/temp_scaffolding_stubs.cc index 84a0307..3515580 100644 --- a/chrome/common/temp_scaffolding_stubs.cc +++ b/chrome/common/temp_scaffolding_stubs.cc @@ -100,13 +100,6 @@ bool Upgrade::SwapNewChromeExeIfPresent() { void OpenFirstRunDialog(Profile* profile) { NOTIMPLEMENTED(); } -GURL NewTabUIURL() { - NOTIMPLEMENTED(); - // TODO(port): returning a blank URL here confuses the page IDs so make sure - // we load something - return GURL("http://dev.chromium.org"); -} - //-------------------------------------------------------------------------- void InstallJankometer(const CommandLine&) { @@ -308,6 +301,11 @@ void ResourceBundle::CleanupSharedInstance() { NOTIMPLEMENTED(); } +bool ResourceBundle::LoadImageResourceBytes(int resource_id, + std::vector<unsigned char>* bytes) { + NOTIMPLEMENTED(); + return false; +} #endif LoginHandler* CreateLoginPrompt(net::AuthChallengeInfo* auth_info, @@ -403,18 +401,6 @@ bool CanImportURL(const GURL& url) { return false; } -bool DOMUIContentsCanHandleURL(GURL* url, - TabContentsType* result_type) { - NOTIMPLEMENTED(); - return false; -} - -bool NewTabUIHandleURL(GURL* url, - TabContentsType* result_type) { - NOTIMPLEMENTED(); - return false; -} - CPBrowserFuncs* GetCPBrowserFuncsForBrowser() { NOTIMPLEMENTED(); return NULL; |