summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-25 14:02:12 +0000
committerpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-25 14:02:12 +0000
commit1fe8d83df42e5e80db2fd9d092a282881fbb1dce (patch)
treecaa489a63c532d372f4957bf0712a95bffcb536e /chrome/browser
parent6d4480b50022d0eaee080b86be3a304a46b0454d (diff)
downloadchromium_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
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/browser.scons1
-rw-r--r--chrome/browser/dom_ui/dom_ui_contents.cc5
-rw-r--r--chrome/browser/dom_ui/new_tab_ui.cc17
3 files changed, 21 insertions, 2 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
}
}
}