summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-05 14:11:52 +0000
committerpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-05 14:11:52 +0000
commite3e4c20194dd6efea907b4104284756fece37653 (patch)
treed952e270859222909d8bd39ad85cbec4c433a781 /chrome/browser
parentfa34a7a36eef3100f3de056ebe79cb55fd62cf09 (diff)
downloadchromium_src-e3e4c20194dd6efea907b4104284756fece37653.zip
chromium_src-e3e4c20194dd6efea907b4104284756fece37653.tar.gz
chromium_src-e3e4c20194dd6efea907b4104284756fece37653.tar.bz2
Get history and download HTML UIs into Mac/Linux builds along with supporting icon scaffolding.
Review URL: http://codereview.chromium.org/39132 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10986 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/browser.scons4
-rw-r--r--chrome/browser/dom_ui/dom_ui_contents.cc16
-rw-r--r--chrome/browser/dom_ui/downloads_ui.cc7
-rw-r--r--chrome/browser/dom_ui/fileicon_source.h8
-rw-r--r--chrome/browser/dom_ui/new_tab_ui.cc8
5 files changed, 26 insertions, 17 deletions
diff --git a/chrome/browser/browser.scons b/chrome/browser/browser.scons
index b18808c..9990442 100644
--- a/chrome/browser/browser.scons
+++ b/chrome/browser/browser.scons
@@ -399,6 +399,10 @@ input_files = ChromeFileList([
'dom_ui/dom_ui_contents.h',
'dom_ui/dom_ui_host.cc',
'dom_ui/dom_ui_host.h',
+ 'dom_ui/downloads_ui.cc',
+ 'dom_ui/downloads_ui.h',
+ 'dom_ui/fileicon_source.cc',
+ 'dom_ui/fileicon_source.h',
'dom_ui/history_ui.cc',
'dom_ui/history_ui.h',
'dom_ui/html_dialog_contents.cc',
diff --git a/chrome/browser/dom_ui/dom_ui_contents.cc b/chrome/browser/dom_ui/dom_ui_contents.cc
index a60978f..ce73635 100644
--- a/chrome/browser/dom_ui/dom_ui_contents.cc
+++ b/chrome/browser/dom_ui/dom_ui_contents.cc
@@ -275,17 +275,21 @@ DOMUI* DOMUIContents::GetDOMUIForURL(const GURL &url) {
url.SchemeIs(chrome::kChromeInternalScheme)) {
return new NewTabUI(this);
}
-#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()) {
+ }
+ if (url.host() == DownloadsUI::GetBaseURL().host()) {
return new DownloadsUI(this);
- } else if (url.host() == ExtensionsUI::GetBaseURL().host()) {
+ }
+#if defined(OS_WIN)
+// TODO(port): include this once these are converted to HTML
+ if (url.host() == ExtensionsUI::GetBaseURL().host()) {
return new ExtensionsUI(this);
- } else if (url.host() == DebuggerContents::GetBaseURL().host()) {
+ }
+ if (url.host() == DebuggerContents::GetBaseURL().host()) {
return new DebuggerContents(this);
- } else if (url.host() == DevToolsUI::GetBaseURL().host()) {
+ }
+ if (url.host() == DevToolsUI::GetBaseURL().host()) {
return new DevToolsUI(this);
}
#else
diff --git a/chrome/browser/dom_ui/downloads_ui.cc b/chrome/browser/dom_ui/downloads_ui.cc
index c7cdcd7..35b9096 100644
--- a/chrome/browser/dom_ui/downloads_ui.cc
+++ b/chrome/browser/dom_ui/downloads_ui.cc
@@ -11,7 +11,10 @@
#include "base/time_format.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/dom_ui/fileicon_source.h"
+#if defined(OS_WIN)
+// TODO(port): re-enable when download_util is ported
#include "chrome/browser/download/download_util.h"
+#endif
#include "chrome/browser/metrics/user_metrics.h"
#include "chrome/browser/profile.h"
#include "chrome/common/jstemplate_builder.h"
@@ -112,8 +115,8 @@ class DownloadItemSorter : public std::binary_function<DownloadItem*,
DownloadsDOMHandler::DownloadsDOMHandler(DOMUI* dom_ui, DownloadManager* dlm)
: DOMMessageHandler(dom_ui),
- download_manager_(dlm),
- search_text_() {
+ search_text_(),
+ download_manager_(dlm) {
dom_ui_->RegisterMessageCallback("getDownloads",
NewCallback(this, &DownloadsDOMHandler::HandleGetDownloads));
dom_ui_->RegisterMessageCallback("openFile",
diff --git a/chrome/browser/dom_ui/fileicon_source.h b/chrome/browser/dom_ui/fileicon_source.h
index e56996c..7fdfb94 100644
--- a/chrome/browser/dom_ui/fileicon_source.h
+++ b/chrome/browser/dom_ui/fileicon_source.h
@@ -6,9 +6,15 @@
#define CHROME_BROWSER_DOM_UI_FILEICON_SOURCE_H_
#include "chrome/browser/dom_ui/chrome_url_data_manager.h"
-#include "chrome/browser/icon_manager.h"
#include "chrome/common/resource_bundle.h"
+#if defined(OS_WIN)
+#include "chrome/browser/icon_manager.h"
+#else
+// TODO(port): Remove when IconManager has been ported.
+#include "chrome/common/temp_scaffolding_stubs.h"
+#endif
+
class GURL;
// FileIconSource is the gateway between network-level chrome:
diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc
index 105061b..34b3ba6 100644
--- a/chrome/browser/dom_ui/new_tab_ui.cc
+++ b/chrome/browser/dom_ui/new_tab_ui.cc
@@ -12,10 +12,7 @@
#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/dom_ui/history_ui.h"
-#endif
#include "chrome/browser/history/page_usage_data.h"
#include "chrome/browser/metrics/user_metrics.h"
#include "chrome/browser/profile.h"
@@ -718,15 +715,10 @@ HistoryHandler::HistoryHandler(DOMUI* dom_ui)
void HistoryHandler::HandleShowHistoryPage(const Value*) {
NavigationController* controller = dom_ui_->get_contents()->controller();
if (controller) {
-#if defined(OS_WIN)
-// TODO(port): include this once history is converted to HTML
UserMetrics::RecordAction(L"NTP_ShowHistory",
dom_ui_->get_profile());
controller->LoadURL(HistoryUI::GetBaseURL(), GURL(), PageTransition::LINK);
// We are deleted by LoadURL, so do not call anything else.
-#else
- NOTIMPLEMENTED();
-#endif
}
}