summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-06 15:32:27 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-06 15:32:27 +0000
commit4d241a59c82631b6df9147509faef9ff6ed198f1 (patch)
treed42991ea7da7147dd704e8b2ea08995c3c0e8508 /chrome
parent3f05f9de010f7a09748477792719ed831fa584a1 (diff)
downloadchromium_src-4d241a59c82631b6df9147509faef9ff6ed198f1.zip
chromium_src-4d241a59c82631b6df9147509faef9ff6ed198f1.tar.gz
chromium_src-4d241a59c82631b6df9147509faef9ff6ed198f1.tar.bz2
Removes force_bookmark_bar_visible_ from WebUI and puts it in
ChromeWebUI. All chrome WebUI classes now extend ChromeWebUI. BUG=none TEST=none R=estade@chromium.org Review URL: http://codereview.chromium.org/7111016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87987 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/extensions/extension_web_ui.cc2
-rw-r--r--chrome/browser/extensions/extension_web_ui.h4
-rw-r--r--chrome/browser/extensions/extensions_ui.cc2
-rw-r--r--chrome/browser/extensions/extensions_ui.h4
-rw-r--r--chrome/browser/ui/bookmarks/bookmark_tab_helper.cc12
-rw-r--r--chrome/browser/ui/webui/bookmarks_ui.cc2
-rw-r--r--chrome/browser/ui/webui/bookmarks_ui.h4
-rw-r--r--chrome/browser/ui/webui/bug_report_ui.h2
-rw-r--r--chrome/browser/ui/webui/chrome_web_ui.cc14
-rw-r--r--chrome/browser/ui/webui/chrome_web_ui.h33
-rw-r--r--chrome/browser/ui/webui/chrome_web_ui_factory.cc20
-rw-r--r--chrome/browser/ui/webui/chromeos/choose_mobile_network_ui.cc2
-rw-r--r--chrome/browser/ui/webui/chromeos/choose_mobile_network_ui.h4
-rw-r--r--chrome/browser/ui/webui/chromeos/enterprise_enrollment_ui.cc2
-rw-r--r--chrome/browser/ui/webui/chromeos/enterprise_enrollment_ui.h4
-rw-r--r--chrome/browser/ui/webui/chromeos/imageburner_ui.cc2
-rw-r--r--chrome/browser/ui/webui/chromeos/imageburner_ui.h4
-rw-r--r--chrome/browser/ui/webui/chromeos/login/login_ui.cc2
-rw-r--r--chrome/browser/ui/webui/chromeos/login/login_ui.h4
-rw-r--r--chrome/browser/ui/webui/chromeos/login/oobe_ui.cc2
-rw-r--r--chrome/browser/ui/webui/chromeos/login/oobe_ui.h4
-rw-r--r--chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc2
-rw-r--r--chrome/browser/ui/webui/chromeos/mobile_setup_ui.h4
-rw-r--r--chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc3
-rw-r--r--chrome/browser/ui/webui/chromeos/proxy_settings_ui.h4
-rw-r--r--chrome/browser/ui/webui/chromeos/register_page_ui.cc2
-rw-r--r--chrome/browser/ui/webui/chromeos/register_page_ui.h4
-rw-r--r--chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc2
-rw-r--r--chrome/browser/ui/webui/chromeos/sim_unlock_ui.h4
-rw-r--r--chrome/browser/ui/webui/chromeos/system_info_ui.cc2
-rw-r--r--chrome/browser/ui/webui/chromeos/system_info_ui.h4
-rw-r--r--chrome/browser/ui/webui/conflicts_ui.cc2
-rw-r--r--chrome/browser/ui/webui/conflicts_ui.h4
-rw-r--r--chrome/browser/ui/webui/constrained_html_ui.cc2
-rw-r--r--chrome/browser/ui/webui/constrained_html_ui.h4
-rw-r--r--chrome/browser/ui/webui/crashes_ui.cc2
-rw-r--r--chrome/browser/ui/webui/crashes_ui.h4
-rw-r--r--chrome/browser/ui/webui/devtools_ui.cc2
-rw-r--r--chrome/browser/ui/webui/devtools_ui.h4
-rw-r--r--chrome/browser/ui/webui/downloads_ui.cc2
-rw-r--r--chrome/browser/ui/webui/downloads_ui.h4
-rw-r--r--chrome/browser/ui/webui/flags_ui.cc2
-rw-r--r--chrome/browser/ui/webui/flags_ui.h4
-rw-r--r--chrome/browser/ui/webui/flash_ui.cc2
-rw-r--r--chrome/browser/ui/webui/flash_ui.h4
-rw-r--r--chrome/browser/ui/webui/gpu_internals_ui.cc6
-rw-r--r--chrome/browser/ui/webui/gpu_internals_ui.h4
-rw-r--r--chrome/browser/ui/webui/history2_ui.cc2
-rw-r--r--chrome/browser/ui/webui/history2_ui.h4
-rw-r--r--chrome/browser/ui/webui/history_ui.cc2
-rw-r--r--chrome/browser/ui/webui/history_ui.h4
-rw-r--r--chrome/browser/ui/webui/html_dialog_ui.cc3
-rw-r--r--chrome/browser/ui/webui/html_dialog_ui.h4
-rw-r--r--chrome/browser/ui/webui/keyboard_ui.cc2
-rw-r--r--chrome/browser/ui/webui/keyboard_ui.h4
-rw-r--r--chrome/browser/ui/webui/net_internals_ui.cc2
-rw-r--r--chrome/browser/ui/webui/net_internals_ui.h4
-rw-r--r--chrome/browser/ui/webui/ntp/new_tab_ui.cc4
-rw-r--r--chrome/browser/ui/webui/ntp/new_tab_ui.h4
-rw-r--r--chrome/browser/ui/webui/options/extension_settings_handler.cc2
-rw-r--r--chrome/browser/ui/webui/options/extension_settings_handler.h4
-rw-r--r--chrome/browser/ui/webui/options/options_ui.cc3
-rw-r--r--chrome/browser/ui/webui/options/options_ui.h4
-rw-r--r--chrome/browser/ui/webui/plugins_ui.cc2
-rw-r--r--chrome/browser/ui/webui/plugins_ui.h4
-rw-r--r--chrome/browser/ui/webui/print_preview_ui.cc2
-rw-r--r--chrome/browser/ui/webui/print_preview_ui.h4
-rw-r--r--chrome/browser/ui/webui/sync_internals_ui.cc2
-rw-r--r--chrome/browser/ui/webui/sync_internals_ui.h5
-rw-r--r--chrome/browser/ui/webui/textfields_ui.cc2
-rw-r--r--chrome/browser/ui/webui/textfields_ui.h4
-rw-r--r--chrome/chrome_browser.gypi2
72 files changed, 171 insertions, 120 deletions
diff --git a/chrome/browser/extensions/extension_web_ui.cc b/chrome/browser/extensions/extension_web_ui.cc
index 32eb5cb..4644127 100644
--- a/chrome/browser/extensions/extension_web_ui.cc
+++ b/chrome/browser/extensions/extension_web_ui.cc
@@ -127,7 +127,7 @@ const char ExtensionWebUI::kExtensionURLOverrides[] =
"extensions.chrome_url_overrides";
ExtensionWebUI::ExtensionWebUI(TabContents* tab_contents, const GURL& url)
- : WebUI(tab_contents),
+ : ChromeWebUI(tab_contents),
url_(url) {
ExtensionService* service = tab_contents->profile()->GetExtensionService();
const Extension* extension = service->GetExtensionByURL(url);
diff --git a/chrome/browser/extensions/extension_web_ui.h b/chrome/browser/extensions/extension_web_ui.h
index 4aad170..cecd955 100644
--- a/chrome/browser/extensions/extension_web_ui.h
+++ b/chrome/browser/extensions/extension_web_ui.h
@@ -11,8 +11,8 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/extensions/extension_bookmark_manager_api.h"
#include "chrome/browser/favicon/favicon_service.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
#include "chrome/common/extensions/extension.h"
-#include "content/browser/webui/web_ui.h"
class GURL;
class ListValue;
@@ -25,7 +25,7 @@ class TabContents;
// the main tab contents area. For example, each extension can specify an
// "options_page", and that page is displayed in the tab contents area and is
// hosted by this class.
-class ExtensionWebUI : public WebUI {
+class ExtensionWebUI : public ChromeWebUI {
public:
static const char kExtensionURLOverrides[];
diff --git a/chrome/browser/extensions/extensions_ui.cc b/chrome/browser/extensions/extensions_ui.cc
index c804a8d..e558542 100644
--- a/chrome/browser/extensions/extensions_ui.cc
+++ b/chrome/browser/extensions/extensions_ui.cc
@@ -816,7 +816,7 @@ ExtensionsDOMHandler::~ExtensionsDOMHandler() {
// ExtensionsDOMHandler, public: -----------------------------------------------
-ExtensionsUI::ExtensionsUI(TabContents* contents) : WebUI(contents) {
+ExtensionsUI::ExtensionsUI(TabContents* contents) : ChromeWebUI(contents) {
ExtensionService *exstension_service =
GetProfile()->GetOriginalProfile()->GetExtensionService();
diff --git a/chrome/browser/extensions/extensions_ui.h b/chrome/browser/extensions/extensions_ui.h
index 00536ce..d8ba972 100644
--- a/chrome/browser/extensions/extensions_ui.h
+++ b/chrome/browser/extensions/extensions_ui.h
@@ -14,8 +14,8 @@
#include "chrome/browser/extensions/pack_extension_job.h"
#include "chrome/browser/ui/shell_dialogs.h"
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
#include "chrome/common/extensions/extension_resource.h"
-#include "content/browser/webui/web_ui.h"
#include "content/common/notification_observer.h"
#include "content/common/notification_registrar.h"
#include "googleurl/src/gurl.h"
@@ -204,7 +204,7 @@ class ExtensionsDOMHandler : public WebUIMessageHandler,
DISALLOW_COPY_AND_ASSIGN(ExtensionsDOMHandler);
};
-class ExtensionsUI : public WebUI {
+class ExtensionsUI : public ChromeWebUI {
public:
explicit ExtensionsUI(TabContents* contents);
diff --git a/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc b/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
index ffe23cf..fa00c71 100644
--- a/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
@@ -8,11 +8,15 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/bookmarks/bookmark_tab_helper_delegate.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/webui/web_ui.h"
#include "content/common/notification_service.h"
+static bool ForceBookmarkBarVisible(WebUI* ui) {
+ return ui && static_cast<ChromeWebUI*>(ui)->force_bookmark_bar_visible();
+}
+
BookmarkTabHelper::BookmarkTabHelper(TabContentsWrapper* tab_contents)
: TabContentsObserver(tab_contents->tab_contents()),
is_starred_(false),
@@ -40,15 +44,13 @@ bool BookmarkTabHelper::ShouldShowBookmarkBar() {
// does.
if (tab_contents()->controller().GetLastCommittedEntry()) {
// Not the first load, always use the committed Web UI.
- return tab_contents()->committed_web_ui() &&
- tab_contents()->committed_web_ui()->force_bookmark_bar_visible();
+ return ForceBookmarkBarVisible(tab_contents()->committed_web_ui());
}
// When it's the first load, we know either the pending one or the committed
// one will have the Web UI in it (see GetWebUIForCurrentState), and only one
// of them will be valid, so we can just check both.
- return tab_contents()->web_ui() &&
- tab_contents()->web_ui()->force_bookmark_bar_visible();
+ return ForceBookmarkBarVisible(tab_contents()->web_ui());
}
void BookmarkTabHelper::DidNavigateMainFramePostCommit(
diff --git a/chrome/browser/ui/webui/bookmarks_ui.cc b/chrome/browser/ui/webui/bookmarks_ui.cc
index e72e51d..88eceb5 100644
--- a/chrome/browser/ui/webui/bookmarks_ui.cc
+++ b/chrome/browser/ui/webui/bookmarks_ui.cc
@@ -46,7 +46,7 @@ std::string BookmarksUIHTMLSource::GetMimeType(const std::string& path) const {
//
////////////////////////////////////////////////////////////////////////////////
-BookmarksUI::BookmarksUI(TabContents* contents) : WebUI(contents) {
+BookmarksUI::BookmarksUI(TabContents* contents) : ChromeWebUI(contents) {
BookmarksUIHTMLSource* html_source = new BookmarksUIHTMLSource();
// Set up the chrome://bookmarks/ source.
diff --git a/chrome/browser/ui/webui/bookmarks_ui.h b/chrome/browser/ui/webui/bookmarks_ui.h
index 0d4c042..a871e5e5 100644
--- a/chrome/browser/ui/webui/bookmarks_ui.h
+++ b/chrome/browser/ui/webui/bookmarks_ui.h
@@ -9,7 +9,7 @@
#include <string>
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
-#include "content/browser/webui/web_ui.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
class GURL;
class RefCountedMemory;
@@ -32,7 +32,7 @@ class BookmarksUIHTMLSource : public ChromeURLDataManager::DataSource {
// This class is used to hook up chrome://bookmarks/ which in turn gets
// overridden by an extension.
-class BookmarksUI : public WebUI {
+class BookmarksUI : public ChromeWebUI {
public:
explicit BookmarksUI(TabContents* contents);
diff --git a/chrome/browser/ui/webui/bug_report_ui.h b/chrome/browser/ui/webui/bug_report_ui.h
index e4814d5..b5dd2a7 100644
--- a/chrome/browser/ui/webui/bug_report_ui.h
+++ b/chrome/browser/ui/webui/bug_report_ui.h
@@ -23,8 +23,8 @@ void ShowHtmlBugReportView(Browser* browser);
class BugReportUI : public HtmlDialogUI {
public:
explicit BugReportUI(TabContents* contents);
- private:
+ private:
DISALLOW_COPY_AND_ASSIGN(BugReportUI);
};
diff --git a/chrome/browser/ui/webui/chrome_web_ui.cc b/chrome/browser/ui/webui/chrome_web_ui.cc
new file mode 100644
index 0000000..69e0e41
--- /dev/null
+++ b/chrome/browser/ui/webui/chrome_web_ui.cc
@@ -0,0 +1,14 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
+
+ChromeWebUI::ChromeWebUI(TabContents* contents)
+ : WebUI(contents),
+ force_bookmark_bar_visible_(false) {
+}
+
+ChromeWebUI::~ChromeWebUI() {
+}
+
diff --git a/chrome/browser/ui/webui/chrome_web_ui.h b/chrome/browser/ui/webui/chrome_web_ui.h
new file mode 100644
index 0000000..3a15d47
--- /dev/null
+++ b/chrome/browser/ui/webui/chrome_web_ui.h
@@ -0,0 +1,33 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_WEBUI_CHROME_WEB_UI_H_
+#define CHROME_BROWSER_UI_WEBUI_CHROME_WEB_UI_H_
+#pragma once
+
+#include "content/browser/webui/web_ui.h"
+
+class ChromeWebUI : public WebUI {
+ public:
+ explicit ChromeWebUI(TabContents* contents);
+ virtual ~ChromeWebUI();
+
+ // Returns true if the bookmark bar should be forced to being visible,
+ // overriding the user's preference.
+ bool force_bookmark_bar_visible() const {
+ return force_bookmark_bar_visible_;
+ }
+
+ protected:
+ void set_force_bookmark_bar_visible(bool value) {
+ force_bookmark_bar_visible_ = value;
+ }
+
+ private:
+ bool force_bookmark_bar_visible_;
+
+ DISALLOW_COPY_AND_ASSIGN(ChromeWebUI);
+};
+
+#endif // CHROME_BROWSER_UI_WEBUI_CHROME_WEB_UI_H_
diff --git a/chrome/browser/ui/webui/chrome_web_ui_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_factory.cc
index 39fe0af..56060bc 100644
--- a/chrome/browser/ui/webui/chrome_web_ui_factory.cc
+++ b/chrome/browser/ui/webui/chrome_web_ui_factory.cc
@@ -64,25 +64,23 @@ namespace {
// A function for creating a new WebUI. The caller owns the return value, which
// may be NULL (for example, if the URL refers to an non-existent extension).
-typedef WebUI* (*WebUIFactoryFunction)(TabContents* tab_contents,
- const GURL& url);
+typedef ChromeWebUI* (*WebUIFactoryFunction)(TabContents* tab_contents,
+ const GURL& url);
// Template for defining WebUIFactoryFunction.
template<class T>
-WebUI* NewWebUI(TabContents* contents, const GURL& url) {
+ChromeWebUI* NewWebUI(TabContents* contents, const GURL& url) {
return new T(contents);
}
// Special case for extensions.
template<>
-WebUI* NewWebUI<ExtensionWebUI>(TabContents* contents, const GURL& url) {
+ChromeWebUI* NewWebUI<ExtensionWebUI>(TabContents* contents, const GURL& url) {
// Don't use a WebUI for incognito tabs because we require extensions to run
// within a single process.
ExtensionService* service = contents->profile()->GetExtensionService();
- if (service &&
- service->ExtensionBindingsAllowed(url)) {
+ if (service && service->ExtensionBindingsAllowed(url))
return new ExtensionWebUI(contents, url);
- }
return NULL;
}
@@ -126,7 +124,7 @@ static WebUIFactoryFunction GetWebUIFactoryFunction(Profile* profile,
// Give about:about a generic Web UI so it can navigate to pages with Web UIs.
if (url.spec() == chrome::kChromeUIAboutAboutURL)
- return &NewWebUI<WebUI>;
+ return &NewWebUI<ChromeWebUI>;
// We must compare hosts only since some of the Web UIs append extra stuff
// after the host name.
@@ -168,6 +166,8 @@ static WebUIFactoryFunction GetWebUIFactoryFunction(Profile* profile,
return &NewWebUI<PluginsUI>;
if (url.host() == chrome::kChromeUISyncInternalsHost)
return &NewWebUI<SyncInternalsUI>;
+ if (url.host() == chrome::kChromeUISettingsHost)
+ return &NewWebUI<OptionsUI>;
#if defined(OS_CHROMEOS)
if (url.host() == chrome::kChromeUIChooseMobileNetworkHost)
@@ -192,8 +192,6 @@ static WebUIFactoryFunction GetWebUIFactoryFunction(Profile* profile,
return &NewWebUI<chromeos::ProxySettingsUI>;
if (url.host() == chrome::kChromeUIRegisterPageHost)
return &NewWebUI<RegisterPageUI>;
- if (url.host() == chrome::kChromeUISettingsHost)
- return &NewWebUI<OptionsUI>;
if (url.host() == chrome::kChromeUISimUnlockHost)
return &NewWebUI<chromeos::SimUnlockUI>;
if (url.host() == chrome::kChromeUISystemInfoHost)
@@ -201,8 +199,6 @@ static WebUIFactoryFunction GetWebUIFactoryFunction(Profile* profile,
if (url.host() == chrome::kChromeUIEnterpriseEnrollmentHost)
return &NewWebUI<chromeos::EnterpriseEnrollmentUI>;
#else
- if (url.host() == chrome::kChromeUISettingsHost)
- return &NewWebUI<OptionsUI>;
if (url.host() == chrome::kChromeUIPrintHost &&
switches::IsPrintPreviewEnabled()) {
return &NewWebUI<PrintPreviewUI>;
diff --git a/chrome/browser/ui/webui/chromeos/choose_mobile_network_ui.cc b/chrome/browser/ui/webui/chromeos/choose_mobile_network_ui.cc
index cab1913..34cb867 100644
--- a/chrome/browser/ui/webui/chromeos/choose_mobile_network_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/choose_mobile_network_ui.cc
@@ -222,7 +222,7 @@ void ChooseMobileNetworkHandler::HandleConnect(const ListValue* args) {
} // namespace
ChooseMobileNetworkUI::ChooseMobileNetworkUI(TabContents* contents)
- : WebUI(contents) {
+ : ChromeWebUI(contents) {
ChooseMobileNetworkHandler* handler = new ChooseMobileNetworkHandler();
AddMessageHandler((handler)->Attach(this));
ChooseMobileNetworkHTMLSource* html_source =
diff --git a/chrome/browser/ui/webui/chromeos/choose_mobile_network_ui.h b/chrome/browser/ui/webui/chromeos/choose_mobile_network_ui.h
index 1a08624..131e2ab 100644
--- a/chrome/browser/ui/webui/chromeos/choose_mobile_network_ui.h
+++ b/chrome/browser/ui/webui/chromeos/choose_mobile_network_ui.h
@@ -6,12 +6,12 @@
#define CHROME_BROWSER_UI_WEBUI_CHROMEOS_CHOOSE_MOBILE_NETWORK_UI_H_
#pragma once
-#include "content/browser/webui/web_ui.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
namespace chromeos {
// A custom WebUI that defines datasource for choosing cellular network dialog.
-class ChooseMobileNetworkUI : public WebUI {
+class ChooseMobileNetworkUI : public ChromeWebUI {
public:
explicit ChooseMobileNetworkUI(TabContents* contents);
diff --git a/chrome/browser/ui/webui/chromeos/enterprise_enrollment_ui.cc b/chrome/browser/ui/webui/chromeos/enterprise_enrollment_ui.cc
index 5c4b75d..ad2717c 100644
--- a/chrome/browser/ui/webui/chromeos/enterprise_enrollment_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/enterprise_enrollment_ui.cc
@@ -271,7 +271,7 @@ void EnterpriseEnrollmentDataSource::AddString(DictionaryValue* dictionary,
}
EnterpriseEnrollmentUI::EnterpriseEnrollmentUI(TabContents* contents)
- : WebUI(contents) {}
+ : ChromeWebUI(contents) {}
EnterpriseEnrollmentUI::~EnterpriseEnrollmentUI() {}
diff --git a/chrome/browser/ui/webui/chromeos/enterprise_enrollment_ui.h b/chrome/browser/ui/webui/chromeos/enterprise_enrollment_ui.h
index aa73438..1e7b6d2 100644
--- a/chrome/browser/ui/webui/chromeos/enterprise_enrollment_ui.h
+++ b/chrome/browser/ui/webui/chromeos/enterprise_enrollment_ui.h
@@ -7,13 +7,13 @@
#pragma once
#include "base/compiler_specific.h"
-#include "content/browser/webui/web_ui.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
namespace chromeos {
// WebUI implementation that handles the enterprise enrollment dialog in the
// Chrome OS login flow.
-class EnterpriseEnrollmentUI : public WebUI {
+class EnterpriseEnrollmentUI : public ChromeWebUI {
public:
// This defines the interface for controllers which will be called back when
// something happens on the UI. It is stored in a property of the TabContents.
diff --git a/chrome/browser/ui/webui/chromeos/imageburner_ui.cc b/chrome/browser/ui/webui/chromeos/imageburner_ui.cc
index 70d3313..188c63b 100644
--- a/chrome/browser/ui/webui/chromeos/imageburner_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/imageburner_ui.cc
@@ -1046,7 +1046,7 @@ void ImageBurnDownloader::DownloadStarted(bool success, const GURL& url) {
// ImageBurnUI
//
////////////////////////////////////////////////////////////////////////////////
-ImageBurnUI::ImageBurnUI(TabContents* contents) : WebUI(contents) {
+ImageBurnUI::ImageBurnUI(TabContents* contents) : ChromeWebUI(contents) {
ImageBurnHandler* handler = new ImageBurnHandler(contents);
AddMessageHandler((handler)->Attach(this));
ImageBurnUIHTMLSource* html_source = new ImageBurnUIHTMLSource();
diff --git a/chrome/browser/ui/webui/chromeos/imageburner_ui.h b/chrome/browser/ui/webui/chromeos/imageburner_ui.h
index 9a82a16..28732da 100644
--- a/chrome/browser/ui/webui/chromeos/imageburner_ui.h
+++ b/chrome/browser/ui/webui/chromeos/imageburner_ui.h
@@ -25,8 +25,8 @@
#include "chrome/browser/download/download_manager.h"
#include "chrome/browser/download/download_util.h"
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/webui/web_ui.h"
#include "googleurl/src/gurl.h"
#include "net/base/file_stream.h"
#include "ui/base/dragdrop/download_file_interface.h"
@@ -448,7 +448,7 @@ class ImageBurnHandler
DISALLOW_COPY_AND_ASSIGN(ImageBurnHandler);
};
-class ImageBurnUI : public WebUI {
+class ImageBurnUI : public ChromeWebUI {
public:
explicit ImageBurnUI(TabContents* contents);
diff --git a/chrome/browser/ui/webui/chromeos/login/login_ui.cc b/chrome/browser/ui/webui/chromeos/login/login_ui.cc
index a70c585..baf9c69 100644
--- a/chrome/browser/ui/webui/chromeos/login/login_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/login/login_ui.cc
@@ -120,7 +120,7 @@ void LoginUIHandler::ClearAndEnablePassword() {
// LoginUI, public: ------------------------------------------------------------
LoginUI::LoginUI(TabContents* contents)
- : WebUI(contents) {
+ : ChromeWebUI(contents) {
LoginUIHandler* handler = new LoginUIHandler();
AddMessageHandler(handler->Attach(this));
LoginUIHTMLSource* html_source =
diff --git a/chrome/browser/ui/webui/chromeos/login/login_ui.h b/chrome/browser/ui/webui/chromeos/login/login_ui.h
index 95627b3..ef183991 100644
--- a/chrome/browser/ui/webui/chromeos/login/login_ui.h
+++ b/chrome/browser/ui/webui/chromeos/login/login_ui.h
@@ -10,7 +10,7 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
-#include "content/browser/webui/web_ui.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
class Profile;
@@ -83,7 +83,7 @@ class LoginUIHandler : public WebUIMessageHandler {
// Boilerplate class that is used to associate the LoginUI code with the WebUI
// code.
-class LoginUI : public WebUI {
+class LoginUI : public ChromeWebUI {
public:
explicit LoginUI(TabContents* contents);
diff --git a/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc b/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
index 396105b..aa2f47d 100644
--- a/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
@@ -148,7 +148,7 @@ void CoreOobeHandler::OnInitialized(const ListValue* args) {
// OobeUI ----------------------------------------------------------------------
OobeUI::OobeUI(TabContents* contents)
- : WebUI(contents),
+ : ChromeWebUI(contents),
update_screen_actor_(NULL),
network_screen_actor_(NULL),
eula_screen_actor_(NULL) {
diff --git a/chrome/browser/ui/webui/chromeos/login/oobe_ui.h b/chrome/browser/ui/webui/chromeos/login/oobe_ui.h
index d2fc4c5..6ca8387 100644
--- a/chrome/browser/ui/webui/chromeos/login/oobe_ui.h
+++ b/chrome/browser/ui/webui/chromeos/login/oobe_ui.h
@@ -7,7 +7,7 @@
#pragma once
#include "chrome/browser/chromeos/login/oobe_display.h"
-#include "content/browser/webui/web_ui.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
class DictionaryValue;
@@ -34,7 +34,7 @@ class OobeMessageHandler : public WebUIMessageHandler {
// - eula screen (CrOS (+ OEM) EULA content/TPM password/crash reporting).
// - update screen.
class OobeUI : public OobeDisplay,
- public WebUI {
+ public ChromeWebUI {
public:
explicit OobeUI(TabContents* contents);
diff --git a/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc b/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc
index f8df7cb0..e0a7b93 100644
--- a/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc
@@ -1315,7 +1315,7 @@ void MobileSetupHandler::LoadCellularConfig() {
//
////////////////////////////////////////////////////////////////////////////////
-MobileSetupUI::MobileSetupUI(TabContents* contents) : WebUI(contents) {
+MobileSetupUI::MobileSetupUI(TabContents* contents) : ChromeWebUI(contents) {
chromeos::CellularNetwork* network = GetCellularNetwork();
std::string service_path = network ? network->service_path() : std::string();
MobileSetupHandler* handler = new MobileSetupHandler(service_path);
diff --git a/chrome/browser/ui/webui/chromeos/mobile_setup_ui.h b/chrome/browser/ui/webui/chromeos/mobile_setup_ui.h
index 9ea141d..dfee160 100644
--- a/chrome/browser/ui/webui/chromeos/mobile_setup_ui.h
+++ b/chrome/browser/ui/webui/chromeos/mobile_setup_ui.h
@@ -6,11 +6,11 @@
#define CHROME_BROWSER_UI_WEBUI_CHROMEOS_MOBILE_SETUP_UI_H_
#pragma once
-#include "content/browser/webui/web_ui.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
// A custom WebUI that defines datasource for mobile setup registration page
// that is used in Chrome OS activate modem and perform plan subscription tasks.
-class MobileSetupUI : public WebUI {
+class MobileSetupUI : public ChromeWebUI {
public:
explicit MobileSetupUI(TabContents* contents);
diff --git a/chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc b/chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc
index 2a53700..83e96fd 100644
--- a/chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc
@@ -66,7 +66,8 @@ void ProxySettingsHTMLSource::StartDataRequest(const std::string& path,
namespace chromeos {
-ProxySettingsUI::ProxySettingsUI(TabContents* contents) : WebUI(contents) {
+ProxySettingsUI::ProxySettingsUI(TabContents* contents)
+ : ChromeWebUI(contents) {
// |localized_strings| will be owned by ProxySettingsHTMLSource.
DictionaryValue* localized_strings = new DictionaryValue();
diff --git a/chrome/browser/ui/webui/chromeos/proxy_settings_ui.h b/chrome/browser/ui/webui/chromeos/proxy_settings_ui.h
index 01b699f..e209c8e 100644
--- a/chrome/browser/ui/webui/chromeos/proxy_settings_ui.h
+++ b/chrome/browser/ui/webui/chromeos/proxy_settings_ui.h
@@ -6,14 +6,14 @@
#define CHROME_BROWSER_UI_WEBUI_CHROMEOS_PROXY_SETTINGS_UI_H_
#pragma once
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
#include "chrome/browser/ui/webui/options/options_ui.h"
-#include "content/browser/webui/web_ui.h"
namespace chromeos {
// A WebUI to host proxy settings splitted from settings page for better
// performance.
-class ProxySettingsUI : public WebUI,
+class ProxySettingsUI : public ChromeWebUI,
public OptionsPageUIHandlerHost {
public:
explicit ProxySettingsUI(TabContents* contents);
diff --git a/chrome/browser/ui/webui/chromeos/register_page_ui.cc b/chrome/browser/ui/webui/chromeos/register_page_ui.cc
index 2e16390..5cae02cd 100644
--- a/chrome/browser/ui/webui/chromeos/register_page_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/register_page_ui.cc
@@ -307,7 +307,7 @@ void RegisterPageHandler::SendUserInfo() {
//
////////////////////////////////////////////////////////////////////////////////
-RegisterPageUI::RegisterPageUI(TabContents* contents) : WebUI(contents){
+RegisterPageUI::RegisterPageUI(TabContents* contents) : ChromeWebUI(contents) {
RegisterPageHandler* handler = new RegisterPageHandler();
AddMessageHandler((handler)->Attach(this));
handler->Init();
diff --git a/chrome/browser/ui/webui/chromeos/register_page_ui.h b/chrome/browser/ui/webui/chromeos/register_page_ui.h
index a0dbcc5..6d67da7 100644
--- a/chrome/browser/ui/webui/chromeos/register_page_ui.h
+++ b/chrome/browser/ui/webui/chromeos/register_page_ui.h
@@ -6,11 +6,11 @@
#define CHROME_BROWSER_UI_WEBUI_CHROMEOS_REGISTER_PAGE_UI_H_
#pragma once
-#include "content/browser/webui/web_ui.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
// A custom WebUI that defines datasource for host registration page that
// is used in Chrome OS to register product on first sign in.
-class RegisterPageUI : public WebUI {
+class RegisterPageUI : public ChromeWebUI {
public:
explicit RegisterPageUI(TabContents* contents);
diff --git a/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc b/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc
index b7bee2e..41e31cd 100644
--- a/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc
@@ -653,7 +653,7 @@ void SimUnlockHandler::UpdatePage(const chromeos::NetworkDevice* cellular,
// SimUnlockUI -----------------------------------------------------------------
-SimUnlockUI::SimUnlockUI(TabContents* contents) : WebUI(contents) {
+SimUnlockUI::SimUnlockUI(TabContents* contents) : ChromeWebUI(contents) {
SimUnlockHandler* handler = new SimUnlockHandler();
AddMessageHandler((handler)->Attach(this));
handler->Init(contents);
diff --git a/chrome/browser/ui/webui/chromeos/sim_unlock_ui.h b/chrome/browser/ui/webui/chromeos/sim_unlock_ui.h
index f6bd2e2..b3b420e 100644
--- a/chrome/browser/ui/webui/chromeos/sim_unlock_ui.h
+++ b/chrome/browser/ui/webui/chromeos/sim_unlock_ui.h
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_UI_WEBUI_CHROMEOS_SIM_UNLOCK_UI_H_
#pragma once
-#include "content/browser/webui/web_ui.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
namespace chromeos {
@@ -14,7 +14,7 @@ namespace chromeos {
// in Chrome OS for specific tasks:
// - Unlock SIM card (enter PIN/PUK codes).
// - Display "SIM card is blocked" message when there're no PUK tries left.
-class SimUnlockUI : public WebUI {
+class SimUnlockUI : public ChromeWebUI {
public:
explicit SimUnlockUI(TabContents* contents);
diff --git a/chrome/browser/ui/webui/chromeos/system_info_ui.cc b/chrome/browser/ui/webui/chromeos/system_info_ui.cc
index 40d23e3..7d423c5 100644
--- a/chrome/browser/ui/webui/chromeos/system_info_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/system_info_ui.cc
@@ -176,7 +176,7 @@ void SystemInfoHandler::RegisterMessages() {
//
////////////////////////////////////////////////////////////////////////////////
-SystemInfoUI::SystemInfoUI(TabContents* contents) : WebUI(contents) {
+SystemInfoUI::SystemInfoUI(TabContents* contents) : ChromeWebUI(contents) {
SystemInfoHandler* handler = new SystemInfoHandler();
AddMessageHandler((handler)->Attach(this));
SystemInfoUIHTMLSource* html_source = new SystemInfoUIHTMLSource();
diff --git a/chrome/browser/ui/webui/chromeos/system_info_ui.h b/chrome/browser/ui/webui/chromeos/system_info_ui.h
index 5f116ad0..a47af7d 100644
--- a/chrome/browser/ui/webui/chromeos/system_info_ui.h
+++ b/chrome/browser/ui/webui/chromeos/system_info_ui.h
@@ -6,9 +6,9 @@
#define CHROME_BROWSER_UI_WEBUI_CHROMEOS_SYSTEM_INFO_UI_H_
#pragma once
-#include "content/browser/webui/web_ui.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
-class SystemInfoUI : public WebUI {
+class SystemInfoUI : public ChromeWebUI {
public:
explicit SystemInfoUI(TabContents* contents);
diff --git a/chrome/browser/ui/webui/conflicts_ui.cc b/chrome/browser/ui/webui/conflicts_ui.cc
index d1c7d2f..4e70012 100644
--- a/chrome/browser/ui/webui/conflicts_ui.cc
+++ b/chrome/browser/ui/webui/conflicts_ui.cc
@@ -196,7 +196,7 @@ void ConflictsDOMHandler::Observe(NotificationType type,
//
///////////////////////////////////////////////////////////////////////////////
-ConflictsUI::ConflictsUI(TabContents* contents) : WebUI(contents) {
+ConflictsUI::ConflictsUI(TabContents* contents) : ChromeWebUI(contents) {
UserMetrics::RecordAction(
UserMetricsAction("ViewAboutConflicts"));
diff --git a/chrome/browser/ui/webui/conflicts_ui.h b/chrome/browser/ui/webui/conflicts_ui.h
index 3e05ccf..a3a39e0 100644
--- a/chrome/browser/ui/webui/conflicts_ui.h
+++ b/chrome/browser/ui/webui/conflicts_ui.h
@@ -6,14 +6,14 @@
#define CHROME_BROWSER_UI_WEBUI_CONFLICTS_UI_H_
#pragma once
-#include "content/browser/webui/web_ui.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
#if defined(OS_WIN)
class RefCountedMemory;
// The Web UI handler for about:conflicts.
-class ConflictsUI : public WebUI {
+class ConflictsUI : public ChromeWebUI {
public:
explicit ConflictsUI(TabContents* contents);
diff --git a/chrome/browser/ui/webui/constrained_html_ui.cc b/chrome/browser/ui/webui/constrained_html_ui.cc
index 2e90d0e..7af17ea 100644
--- a/chrome/browser/ui/webui/constrained_html_ui.cc
+++ b/chrome/browser/ui/webui/constrained_html_ui.cc
@@ -15,7 +15,7 @@ static base::LazyInstance<PropertyAccessor<ConstrainedHtmlUIDelegate*> >
g_constrained_html_ui_property_accessor(base::LINKER_INITIALIZED);
ConstrainedHtmlUI::ConstrainedHtmlUI(TabContents* contents)
- : WebUI(contents) {
+ : ChromeWebUI(contents) {
}
ConstrainedHtmlUI::~ConstrainedHtmlUI() {
diff --git a/chrome/browser/ui/webui/constrained_html_ui.h b/chrome/browser/ui/webui/constrained_html_ui.h
index 4186b36..54e62d6 100644
--- a/chrome/browser/ui/webui/constrained_html_ui.h
+++ b/chrome/browser/ui/webui/constrained_html_ui.h
@@ -8,8 +8,8 @@
#include <vector>
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
#include "content/browser/tab_contents/constrained_window.h"
-#include "content/browser/webui/web_ui.h"
#include "content/common/property_bag.h"
class HtmlDialogUIDelegate;
@@ -31,7 +31,7 @@ class ConstrainedHtmlUIDelegate {
//
// Since ConstrainedWindow requires platform-specific delegate
// implementations, this class is just a factory stub.
-class ConstrainedHtmlUI : public WebUI {
+class ConstrainedHtmlUI : public ChromeWebUI {
public:
explicit ConstrainedHtmlUI(TabContents* contents);
virtual ~ConstrainedHtmlUI();
diff --git a/chrome/browser/ui/webui/crashes_ui.cc b/chrome/browser/ui/webui/crashes_ui.cc
index d67f6ab..30a0b20 100644
--- a/chrome/browser/ui/webui/crashes_ui.cc
+++ b/chrome/browser/ui/webui/crashes_ui.cc
@@ -194,7 +194,7 @@ void CrashesDOMHandler::UpdateUI() {
//
///////////////////////////////////////////////////////////////////////////////
-CrashesUI::CrashesUI(TabContents* contents) : WebUI(contents) {
+CrashesUI::CrashesUI(TabContents* contents) : ChromeWebUI(contents) {
AddMessageHandler((new CrashesDOMHandler())->Attach(this));
CrashesUIHTMLSource* html_source = new CrashesUIHTMLSource();
diff --git a/chrome/browser/ui/webui/crashes_ui.h b/chrome/browser/ui/webui/crashes_ui.h
index 72c60e2..535f853 100644
--- a/chrome/browser/ui/webui/crashes_ui.h
+++ b/chrome/browser/ui/webui/crashes_ui.h
@@ -6,11 +6,11 @@
#define CHROME_BROWSER_UI_WEBUI_CRASHES_UI_H_
#pragma once
-#include "content/browser/webui/web_ui.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
class RefCountedMemory;
-class CrashesUI : public WebUI {
+class CrashesUI : public ChromeWebUI {
public:
explicit CrashesUI(TabContents* contents);
diff --git a/chrome/browser/ui/webui/devtools_ui.cc b/chrome/browser/ui/webui/devtools_ui.cc
index 6008f46..3999c5e 100644
--- a/chrome/browser/ui/webui/devtools_ui.cc
+++ b/chrome/browser/ui/webui/devtools_ui.cc
@@ -96,7 +96,7 @@ void DevToolsUI::RegisterDevToolsDataSource() {
}
}
-DevToolsUI::DevToolsUI(TabContents* contents) : WebUI(contents) {
+DevToolsUI::DevToolsUI(TabContents* contents) : ChromeWebUI(contents) {
DevToolsDataSource* data_source = new DevToolsDataSource();
contents->profile()->GetChromeURLDataManager()->AddDataSource(data_source);
}
diff --git a/chrome/browser/ui/webui/devtools_ui.h b/chrome/browser/ui/webui/devtools_ui.h
index 93c9866..07bdc85 100644
--- a/chrome/browser/ui/webui/devtools_ui.h
+++ b/chrome/browser/ui/webui/devtools_ui.h
@@ -6,9 +6,9 @@
#define CHROME_BROWSER_UI_WEBUI_DEVTOOLS_UI_H_
#pragma once
-#include "content/browser/webui/web_ui.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
-class DevToolsUI : public WebUI {
+class DevToolsUI : public ChromeWebUI {
public:
static void RegisterDevToolsDataSource();
diff --git a/chrome/browser/ui/webui/downloads_ui.cc b/chrome/browser/ui/webui/downloads_ui.cc
index 9bc2c32..e53c15d 100644
--- a/chrome/browser/ui/webui/downloads_ui.cc
+++ b/chrome/browser/ui/webui/downloads_ui.cc
@@ -109,7 +109,7 @@ std::string DownloadsUIHTMLSource::GetMimeType(const std::string& path) const {
//
///////////////////////////////////////////////////////////////////////////////
-DownloadsUI::DownloadsUI(TabContents* contents) : WebUI(contents) {
+DownloadsUI::DownloadsUI(TabContents* contents) : ChromeWebUI(contents) {
DownloadManager* dlm = GetProfile()->GetDownloadManager();
DownloadsDOMHandler* handler = new DownloadsDOMHandler(dlm);
diff --git a/chrome/browser/ui/webui/downloads_ui.h b/chrome/browser/ui/webui/downloads_ui.h
index 41c1832..0b77c37 100644
--- a/chrome/browser/ui/webui/downloads_ui.h
+++ b/chrome/browser/ui/webui/downloads_ui.h
@@ -6,11 +6,11 @@
#define CHROME_BROWSER_UI_WEBUI_DOWNLOADS_UI_H_
#pragma once
-#include "content/browser/webui/web_ui.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
class RefCountedMemory;
-class DownloadsUI : public WebUI {
+class DownloadsUI : public ChromeWebUI {
public:
explicit DownloadsUI(TabContents* contents);
diff --git a/chrome/browser/ui/webui/flags_ui.cc b/chrome/browser/ui/webui/flags_ui.cc
index 49dc9a6..7fd8ed3 100644
--- a/chrome/browser/ui/webui/flags_ui.cc
+++ b/chrome/browser/ui/webui/flags_ui.cc
@@ -208,7 +208,7 @@ void FlagsDOMHandler::HandleRestartBrowser(const ListValue* args) {
//
///////////////////////////////////////////////////////////////////////////////
-FlagsUI::FlagsUI(TabContents* contents) : WebUI(contents) {
+FlagsUI::FlagsUI(TabContents* contents) : ChromeWebUI(contents) {
AddMessageHandler((new FlagsDOMHandler())->Attach(this));
FlagsUIHTMLSource* html_source = new FlagsUIHTMLSource();
diff --git a/chrome/browser/ui/webui/flags_ui.h b/chrome/browser/ui/webui/flags_ui.h
index 97c5fec..a81ebac 100644
--- a/chrome/browser/ui/webui/flags_ui.h
+++ b/chrome/browser/ui/webui/flags_ui.h
@@ -6,12 +6,12 @@
#define CHROME_BROWSER_UI_WEBUI_FLAGS_UI_H_
#pragma once
-#include "content/browser/webui/web_ui.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
class PrefService;
class RefCountedMemory;
-class FlagsUI : public WebUI {
+class FlagsUI : public ChromeWebUI {
public:
explicit FlagsUI(TabContents* contents);
diff --git a/chrome/browser/ui/webui/flash_ui.cc b/chrome/browser/ui/webui/flash_ui.cc
index 644fd5a..b42b3ab 100644
--- a/chrome/browser/ui/webui/flash_ui.cc
+++ b/chrome/browser/ui/webui/flash_ui.cc
@@ -333,7 +333,7 @@ void FlashDOMHandler::MaybeRespondToPage() {
//
///////////////////////////////////////////////////////////////////////////////
-FlashUI::FlashUI(TabContents* contents) : WebUI(contents) {
+FlashUI::FlashUI(TabContents* contents) : ChromeWebUI(contents) {
UserMetrics::RecordAction(
UserMetricsAction("ViewAboutFlash"));
diff --git a/chrome/browser/ui/webui/flash_ui.h b/chrome/browser/ui/webui/flash_ui.h
index c8623ab..cc4e699 100644
--- a/chrome/browser/ui/webui/flash_ui.h
+++ b/chrome/browser/ui/webui/flash_ui.h
@@ -6,12 +6,12 @@
#define CHROME_BROWSER_UI_WEBUI_FLASH_UI_H_
#pragma once
-#include "content/browser/webui/web_ui.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
class RefCountedMemory;
// The Web UI handler for about:flash.
-class FlashUI : public WebUI {
+class FlashUI : public ChromeWebUI {
public:
explicit FlashUI(TabContents* contents);
diff --git a/chrome/browser/ui/webui/gpu_internals_ui.cc b/chrome/browser/ui/webui/gpu_internals_ui.cc
index 81d0032..bbbc46b 100644
--- a/chrome/browser/ui/webui/gpu_internals_ui.cc
+++ b/chrome/browser/ui/webui/gpu_internals_ui.cc
@@ -351,7 +351,7 @@ class WriteTraceFileTask : public Task {
void GpuMessageHandler::FileSelected(
const FilePath& path, int index, void* params) {
- if(select_trace_file_dialog_type_ == SelectFileDialog::SELECT_OPEN_FILE)
+ if (select_trace_file_dialog_type_ == SelectFileDialog::SELECT_OPEN_FILE)
BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,
new ReadTraceFileTask(new TaskProxy(AsWeakPtr()), path));
@@ -365,7 +365,7 @@ void GpuMessageHandler::FileSelected(
void GpuMessageHandler::FileSelectionCanceled(void* params) {
select_trace_file_dialog_.release();
- if(select_trace_file_dialog_type_ == SelectFileDialog::SELECT_OPEN_FILE)
+ if (select_trace_file_dialog_type_ == SelectFileDialog::SELECT_OPEN_FILE)
web_ui_->CallJavascriptFunction("tracingController.onLoadTraceFileCanceled");
else
web_ui_->CallJavascriptFunction("tracingController.onSaveTraceFileCanceled");
@@ -641,7 +641,7 @@ void GpuMessageHandler::OnTraceBufferPercentFullReply(float percent_full) {
//
////////////////////////////////////////////////////////////////////////////////
-GpuInternalsUI::GpuInternalsUI(TabContents* contents) : WebUI(contents) {
+GpuInternalsUI::GpuInternalsUI(TabContents* contents) : ChromeWebUI(contents) {
AddMessageHandler((new GpuMessageHandler())->Attach(this));
GpuHTMLSource* html_source = new GpuHTMLSource();
diff --git a/chrome/browser/ui/webui/gpu_internals_ui.h b/chrome/browser/ui/webui/gpu_internals_ui.h
index 5e7d841..8d1d163 100644
--- a/chrome/browser/ui/webui/gpu_internals_ui.h
+++ b/chrome/browser/ui/webui/gpu_internals_ui.h
@@ -6,9 +6,9 @@
#define CHROME_BROWSER_UI_WEBUI_GPU_INTERNALS_UI_H_
#pragma once
-#include "content/browser/webui/web_ui.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
-class GpuInternalsUI : public WebUI {
+class GpuInternalsUI : public ChromeWebUI {
public:
explicit GpuInternalsUI(TabContents* contents);
diff --git a/chrome/browser/ui/webui/history2_ui.cc b/chrome/browser/ui/webui/history2_ui.cc
index d59bdcc..0bb9d1b 100644
--- a/chrome/browser/ui/webui/history2_ui.cc
+++ b/chrome/browser/ui/webui/history2_ui.cc
@@ -375,7 +375,7 @@ history::QueryOptions BrowsingHistoryHandler2::CreateMonthQueryOptions(
//
////////////////////////////////////////////////////////////////////////////////
-HistoryUI2::HistoryUI2(TabContents* contents) : WebUI(contents) {
+HistoryUI2::HistoryUI2(TabContents* contents) : ChromeWebUI(contents) {
AddMessageHandler((new BrowsingHistoryHandler2())->Attach(this));
HistoryUIHTMLSource2* html_source = new HistoryUIHTMLSource2();
diff --git a/chrome/browser/ui/webui/history2_ui.h b/chrome/browser/ui/webui/history2_ui.h
index e92e337..aed4882 100644
--- a/chrome/browser/ui/webui/history2_ui.h
+++ b/chrome/browser/ui/webui/history2_ui.h
@@ -11,8 +11,8 @@
#include "base/string16.h"
#include "chrome/browser/history/history.h"
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
#include "content/browser/cancelable_request.h"
-#include "content/browser/webui/web_ui.h"
class GURL;
@@ -87,7 +87,7 @@ class BrowsingHistoryHandler2 : public WebUIMessageHandler {
DISALLOW_COPY_AND_ASSIGN(BrowsingHistoryHandler2);
};
-class HistoryUI2 : public WebUI {
+class HistoryUI2 : public ChromeWebUI {
public:
explicit HistoryUI2(TabContents* contents);
diff --git a/chrome/browser/ui/webui/history_ui.cc b/chrome/browser/ui/webui/history_ui.cc
index 97849dd..d5620b7 100644
--- a/chrome/browser/ui/webui/history_ui.cc
+++ b/chrome/browser/ui/webui/history_ui.cc
@@ -366,7 +366,7 @@ history::QueryOptions BrowsingHistoryHandler::CreateMonthQueryOptions(
//
////////////////////////////////////////////////////////////////////////////////
-HistoryUI::HistoryUI(TabContents* contents) : WebUI(contents) {
+HistoryUI::HistoryUI(TabContents* contents) : ChromeWebUI(contents) {
AddMessageHandler((new BrowsingHistoryHandler())->Attach(this));
HistoryUIHTMLSource* html_source = new HistoryUIHTMLSource();
diff --git a/chrome/browser/ui/webui/history_ui.h b/chrome/browser/ui/webui/history_ui.h
index bcc4ea9..7c490ce 100644
--- a/chrome/browser/ui/webui/history_ui.h
+++ b/chrome/browser/ui/webui/history_ui.h
@@ -11,8 +11,8 @@
#include "base/string16.h"
#include "chrome/browser/history/history.h"
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
#include "content/browser/cancelable_request.h"
-#include "content/browser/webui/web_ui.h"
class GURL;
@@ -66,7 +66,7 @@ class BrowsingHistoryHandler : public WebUIMessageHandler {
DISALLOW_COPY_AND_ASSIGN(BrowsingHistoryHandler);
};
-class HistoryUI : public WebUI {
+class HistoryUI : public ChromeWebUI {
public:
explicit HistoryUI(TabContents* contents);
diff --git a/chrome/browser/ui/webui/html_dialog_ui.cc b/chrome/browser/ui/webui/html_dialog_ui.cc
index a8c0607..e8055ea 100644
--- a/chrome/browser/ui/webui/html_dialog_ui.cc
+++ b/chrome/browser/ui/webui/html_dialog_ui.cc
@@ -14,7 +14,8 @@
static base::LazyInstance<PropertyAccessor<HtmlDialogUIDelegate*> >
g_html_dialog_ui_property_accessor(base::LINKER_INITIALIZED);
-HtmlDialogUI::HtmlDialogUI(TabContents* tab_contents) : WebUI(tab_contents) {
+HtmlDialogUI::HtmlDialogUI(TabContents* tab_contents)
+ : ChromeWebUI(tab_contents) {
}
HtmlDialogUI::~HtmlDialogUI() {
diff --git a/chrome/browser/ui/webui/html_dialog_ui.h b/chrome/browser/ui/webui/html_dialog_ui.h
index 9453a9a..c4a78f6 100644
--- a/chrome/browser/ui/webui/html_dialog_ui.h
+++ b/chrome/browser/ui/webui/html_dialog_ui.h
@@ -9,7 +9,7 @@
#include <string>
#include <vector>
-#include "content/browser/webui/web_ui.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
#include "content/common/property_bag.h"
#include "googleurl/src/gurl.h"
@@ -80,7 +80,7 @@ class HtmlDialogUIDelegate {
// there and call it back. This is a bit of a hack to allow the dialog to pass
// its delegate to the Web UI without having nasty accessors on the TabContents.
// The correct design using RVH directly would avoid all of this.
-class HtmlDialogUI : public WebUI {
+class HtmlDialogUI : public ChromeWebUI {
public:
struct HtmlDialogParams {
// The URL for the content that will be loaded in the dialog.
diff --git a/chrome/browser/ui/webui/keyboard_ui.cc b/chrome/browser/ui/webui/keyboard_ui.cc
index 83c23f7..25431f2 100644
--- a/chrome/browser/ui/webui/keyboard_ui.cc
+++ b/chrome/browser/ui/webui/keyboard_ui.cc
@@ -18,7 +18,7 @@
// KeyboardUI
KeyboardUI::KeyboardUI(TabContents* contents)
- : WebUI(contents) {
+ : ChromeWebUI(contents) {
KeyboardHTMLSource* html_source = new KeyboardHTMLSource();
contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source);
}
diff --git a/chrome/browser/ui/webui/keyboard_ui.h b/chrome/browser/ui/webui/keyboard_ui.h
index 7a80a67..b2d42c8 100644
--- a/chrome/browser/ui/webui/keyboard_ui.h
+++ b/chrome/browser/ui/webui/keyboard_ui.h
@@ -9,12 +9,12 @@
#include <string>
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
-#include "content/browser/webui/web_ui.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
class Profile;
// The TabContents used for the keyboard page.
-class KeyboardUI : public WebUI {
+class KeyboardUI : public ChromeWebUI {
public:
explicit KeyboardUI(TabContents* manager);
virtual ~KeyboardUI();
diff --git a/chrome/browser/ui/webui/net_internals_ui.cc b/chrome/browser/ui/webui/net_internals_ui.cc
index 090ea98..f7632ee 100644
--- a/chrome/browser/ui/webui/net_internals_ui.cc
+++ b/chrome/browser/ui/webui/net_internals_ui.cc
@@ -1631,7 +1631,7 @@ void NetInternalsMessageHandler::IOThreadImpl::CallJavascriptFunction(
//
////////////////////////////////////////////////////////////////////////////////
-NetInternalsUI::NetInternalsUI(TabContents* contents) : WebUI(contents) {
+NetInternalsUI::NetInternalsUI(TabContents* contents) : ChromeWebUI(contents) {
AddMessageHandler((new NetInternalsMessageHandler())->Attach(this));
NetInternalsHTMLSource* html_source = new NetInternalsHTMLSource();
diff --git a/chrome/browser/ui/webui/net_internals_ui.h b/chrome/browser/ui/webui/net_internals_ui.h
index 023d76a..3acf4ce 100644
--- a/chrome/browser/ui/webui/net_internals_ui.h
+++ b/chrome/browser/ui/webui/net_internals_ui.h
@@ -6,9 +6,9 @@
#define CHROME_BROWSER_UI_WEBUI_NET_INTERNALS_UI_H_
#pragma once
-#include "content/browser/webui/web_ui.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
-class NetInternalsUI : public WebUI {
+class NetInternalsUI : public ChromeWebUI {
public:
explicit NetInternalsUI(TabContents* contents);
diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.cc b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
index e8cb1ee..56e81f6 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
@@ -315,14 +315,14 @@ void NewTabPageClosePromoHandler::HandleClosePromo(
// NewTabUI
NewTabUI::NewTabUI(TabContents* contents)
- : WebUI(contents) {
+ : ChromeWebUI(contents) {
// Override some options on the Web UI.
hide_favicon_ = true;
if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kNewTabPage4) &&
GetProfile()->GetPrefs()->GetBoolean(prefs::kEnableBookmarkBar) &&
browser_defaults::bookmarks_enabled) {
- force_bookmark_bar_visible_ = true;
+ set_force_bookmark_bar_visible(true);
}
focus_location_bar_by_default_ = true;
diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.h b/chrome/browser/ui/webui/ntp/new_tab_ui.h
index 05888b0c..3b580316 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui.h
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui.h
@@ -12,7 +12,7 @@
#include "base/timer.h"
#include "chrome/browser/sessions/tab_restore_service.h"
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
-#include "content/browser/webui/web_ui.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
#include "content/common/notification_observer.h"
#include "content/common/notification_registrar.h"
@@ -22,7 +22,7 @@ class PrefService;
class Profile;
// The TabContents used for the New Tab page.
-class NewTabUI : public WebUI,
+class NewTabUI : public ChromeWebUI,
public NotificationObserver {
public:
explicit NewTabUI(TabContents* manager);
diff --git a/chrome/browser/ui/webui/options/extension_settings_handler.cc b/chrome/browser/ui/webui/options/extension_settings_handler.cc
index 78c9f62..a57e163 100644
--- a/chrome/browser/ui/webui/options/extension_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/extension_settings_handler.cc
@@ -896,7 +896,7 @@ ExtensionsDOMHandler::~ExtensionsDOMHandler() {
// ExtensionsDOMHandler, public: -----------------------------------------------
-ExtensionsUI::ExtensionsUI(TabContents* contents) : WebUI(contents) {
+ExtensionsUI::ExtensionsUI(TabContents* contents) : ChromeWebUI(contents) {
ExtensionService *exstension_service =
GetProfile()->GetOriginalProfile()->GetExtensionService();
diff --git a/chrome/browser/ui/webui/options/extension_settings_handler.h b/chrome/browser/ui/webui/options/extension_settings_handler.h
index efb8d37..c333635 100644
--- a/chrome/browser/ui/webui/options/extension_settings_handler.h
+++ b/chrome/browser/ui/webui/options/extension_settings_handler.h
@@ -14,8 +14,8 @@
#include "chrome/browser/extensions/pack_extension_job.h"
#include "chrome/browser/ui/shell_dialogs.h"
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
#include "chrome/common/extensions/extension_resource.h"
-#include "content/browser/webui/web_ui.h"
#include "content/common/notification_observer.h"
#include "content/common/notification_registrar.h"
#include "googleurl/src/gurl.h"
@@ -260,7 +260,7 @@ class ExtensionsDOMHandler : public WebUIMessageHandler,
DISALLOW_COPY_AND_ASSIGN(ExtensionsDOMHandler);
};
-class ExtensionsUI : public WebUI {
+class ExtensionsUI : public ChromeWebUI {
public:
explicit ExtensionsUI(TabContents* contents);
diff --git a/chrome/browser/ui/webui/options/options_ui.cc b/chrome/browser/ui/webui/options/options_ui.cc
index d1aed8f..be9ad89 100644
--- a/chrome/browser/ui/webui/options/options_ui.cc
+++ b/chrome/browser/ui/webui/options/options_ui.cc
@@ -205,7 +205,8 @@ void OptionsPageUIHandler::RegisterTitle(DictionaryValue* localized_strings,
////////////////////////////////////////////////////////////////////////////////
OptionsUI::OptionsUI(TabContents* contents)
- : WebUI(contents), initialized_handlers_(false) {
+ : ChromeWebUI(contents),
+ initialized_handlers_(false) {
DictionaryValue* localized_strings = new DictionaryValue();
CoreOptionsHandler* core_handler;
diff --git a/chrome/browser/ui/webui/options/options_ui.h b/chrome/browser/ui/webui/options/options_ui.h
index 4ec68a0..8886d8f 100644
--- a/chrome/browser/ui/webui/options/options_ui.h
+++ b/chrome/browser/ui/webui/options/options_ui.h
@@ -11,7 +11,7 @@
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
-#include "content/browser/webui/web_ui.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
#include "content/common/notification_observer.h"
#include "content/common/notification_registrar.h"
#include "content/common/notification_type.h"
@@ -81,7 +81,7 @@ class OptionsPageUIHandlerHost {
};
// The WebUI for chrome:settings.
-class OptionsUI : public WebUI,
+class OptionsUI : public ChromeWebUI,
public OptionsPageUIHandlerHost {
public:
explicit OptionsUI(TabContents* contents);
diff --git a/chrome/browser/ui/webui/plugins_ui.cc b/chrome/browser/ui/webui/plugins_ui.cc
index 8fa1446..acb825c 100644
--- a/chrome/browser/ui/webui/plugins_ui.cc
+++ b/chrome/browser/ui/webui/plugins_ui.cc
@@ -336,7 +336,7 @@ void PluginsDOMHandler::PluginsLoaded(ListWrapper* wrapper) {
//
///////////////////////////////////////////////////////////////////////////////
-PluginsUI::PluginsUI(TabContents* contents) : WebUI(contents) {
+PluginsUI::PluginsUI(TabContents* contents) : ChromeWebUI(contents) {
AddMessageHandler((new PluginsDOMHandler())->Attach(this));
PluginsUIHTMLSource* html_source = new PluginsUIHTMLSource();
diff --git a/chrome/browser/ui/webui/plugins_ui.h b/chrome/browser/ui/webui/plugins_ui.h
index 752e639..784c009 100644
--- a/chrome/browser/ui/webui/plugins_ui.h
+++ b/chrome/browser/ui/webui/plugins_ui.h
@@ -6,12 +6,12 @@
#define CHROME_BROWSER_UI_WEBUI_PLUGINS_UI_H_
#pragma once
-#include "content/browser/webui/web_ui.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
class PrefService;
class RefCountedMemory;
-class PluginsUI : public WebUI {
+class PluginsUI : public ChromeWebUI {
public:
explicit PluginsUI(TabContents* contents);
diff --git a/chrome/browser/ui/webui/print_preview_ui.cc b/chrome/browser/ui/webui/print_preview_ui.cc
index a9e3327..832cf52 100644
--- a/chrome/browser/ui/webui/print_preview_ui.cc
+++ b/chrome/browser/ui/webui/print_preview_ui.cc
@@ -14,7 +14,7 @@
#include "content/browser/tab_contents/tab_contents.h"
PrintPreviewUI::PrintPreviewUI(TabContents* contents)
- : WebUI(contents),
+ : ChromeWebUI(contents),
initial_preview_start_time_(base::TimeTicks::Now()) {
// PrintPreviewUI owns |handler|.
PrintPreviewHandler* handler = new PrintPreviewHandler();
diff --git a/chrome/browser/ui/webui/print_preview_ui.h b/chrome/browser/ui/webui/print_preview_ui.h
index dc6d691..58ceda8 100644
--- a/chrome/browser/ui/webui/print_preview_ui.h
+++ b/chrome/browser/ui/webui/print_preview_ui.h
@@ -12,11 +12,11 @@
#include "base/memory/ref_counted_memory.h"
#include "base/time.h"
#include "chrome/browser/printing/print_preview_data_service.h"
-#include "content/browser/webui/web_ui.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
class PrintPreviewDataService;
-class PrintPreviewUI : public WebUI {
+class PrintPreviewUI : public ChromeWebUI {
public:
explicit PrintPreviewUI(TabContents* contents);
virtual ~PrintPreviewUI();
diff --git a/chrome/browser/ui/webui/sync_internals_ui.cc b/chrome/browser/ui/webui/sync_internals_ui.cc
index c719895..30b2659b 100644
--- a/chrome/browser/ui/webui/sync_internals_ui.cc
+++ b/chrome/browser/ui/webui/sync_internals_ui.cc
@@ -24,7 +24,7 @@
#include "content/browser/browser_thread.h"
SyncInternalsUI::SyncInternalsUI(TabContents* contents)
- : WebUI(contents) {
+ : ChromeWebUI(contents) {
browser_sync::JsFrontend* backend = GetJsFrontend();
if (backend) {
backend->AddHandler(this);
diff --git a/chrome/browser/ui/webui/sync_internals_ui.h b/chrome/browser/ui/webui/sync_internals_ui.h
index 3339843..4c6ca5a 100644
--- a/chrome/browser/ui/webui/sync_internals_ui.h
+++ b/chrome/browser/ui/webui/sync_internals_ui.h
@@ -11,14 +11,15 @@
#include "base/compiler_specific.h"
#include "base/basictypes.h"
#include "chrome/browser/sync/js_event_handler.h"
-#include "content/browser/webui/web_ui.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
namespace browser_sync {
class JsFrontend;
} // namespace browser_sync
// The implementation for the chrome://sync-internals page.
-class SyncInternalsUI : public WebUI, public browser_sync::JsEventHandler {
+class SyncInternalsUI : public ChromeWebUI,
+ public browser_sync::JsEventHandler {
public:
explicit SyncInternalsUI(TabContents* contents);
virtual ~SyncInternalsUI();
diff --git a/chrome/browser/ui/webui/textfields_ui.cc b/chrome/browser/ui/webui/textfields_ui.cc
index 2f43a0b..819048e5 100644
--- a/chrome/browser/ui/webui/textfields_ui.cc
+++ b/chrome/browser/ui/webui/textfields_ui.cc
@@ -64,7 +64,7 @@ void TextfieldsDOMHandler::HandleTextfieldValue(const ListValue* args) {
/**
* TextfieldsUI implementation.
*/
-TextfieldsUI::TextfieldsUI(TabContents* contents) : WebUI(contents) {
+TextfieldsUI::TextfieldsUI(TabContents* contents) : ChromeWebUI(contents) {
TextfieldsDOMHandler* handler = new TextfieldsDOMHandler();
AddMessageHandler(handler);
handler->Attach(this);
diff --git a/chrome/browser/ui/webui/textfields_ui.h b/chrome/browser/ui/webui/textfields_ui.h
index a9d0f31..bb39b08 100644
--- a/chrome/browser/ui/webui/textfields_ui.h
+++ b/chrome/browser/ui/webui/textfields_ui.h
@@ -9,7 +9,7 @@
#include <string>
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
-#include "content/browser/webui/web_ui.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
class RefCountedMemory;
@@ -55,7 +55,7 @@ class TextfieldsDOMHandler : public WebUIMessageHandler {
DISALLOW_COPY_AND_ASSIGN(TextfieldsDOMHandler);
};
-class TextfieldsUI : public WebUI {
+class TextfieldsUI : public ChromeWebUI {
public:
explicit TextfieldsUI(TabContents* contents);
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index dd02395..16ee15d 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -3272,6 +3272,8 @@
'browser/ui/webui/chrome_url_data_manager_backend.h',
'browser/ui/webui/chrome_url_data_manager.cc',
'browser/ui/webui/chrome_url_data_manager.h',
+ 'browser/ui/webui/chrome_web_ui.cc',
+ 'browser/ui/webui/chrome_web_ui.h',
'browser/ui/webui/chrome_web_ui_data_source.cc',
'browser/ui/webui/chrome_web_ui_data_source.h',
'browser/ui/webui/chrome_web_ui_factory.cc',