Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4018)

Unified Diff: chrome/browser/ui/webui/chrome_web_ui.cc

Issue 7861024: Adds testing infrastructure to web_ui_browsertest to support testing HtmlDialogs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove inline override function declaration for clang. Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/chrome_web_ui.h ('k') | chrome/browser/ui/webui/html_dialog_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/chrome_web_ui.cc
diff --git a/chrome/browser/ui/webui/chrome_web_ui.cc b/chrome/browser/ui/webui/chrome_web_ui.cc
index cd9b0ee519324f2e3b624d8055b3f053fe1f2a5b..8ca121f36404bb1d92d78230d98c9d0916b15482 100644
--- a/chrome/browser/ui/webui/chrome_web_ui.cc
+++ b/chrome/browser/ui/webui/chrome_web_ui.cc
@@ -13,6 +13,13 @@
#include "views/widget/widget.h"
#endif
+namespace {
+
+// If true, overrides IsMoreWebUI flag.
+bool override_more_webui_ = false;
+
+} // namespace
+
ChromeWebUI::ChromeWebUI(TabContents* contents)
: WebUI(contents),
force_bookmark_bar_visible_(false) {
@@ -28,9 +35,13 @@ Profile* ChromeWebUI::GetProfile() const {
// static
bool ChromeWebUI::IsMoreWebUI() {
bool more_webui = CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kUseMoreWebUI);
+ switches::kUseMoreWebUI) || override_more_webui_;
#if defined(TOOLKIT_VIEWS)
more_webui |= views::Widget::IsPureViews();
#endif
return more_webui;
}
+
+void ChromeWebUI::OverrideMoreWebUI(bool use_more_webui) {
+ override_more_webui_ = use_more_webui;
+}
« no previous file with comments | « chrome/browser/ui/webui/chrome_web_ui.h ('k') | chrome/browser/ui/webui/html_dialog_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698