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

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

Issue 7670041: Add --use-more-webui runtime flag to toggle WebUI replacements for native dialogs. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 4 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
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 885711ce9fd6feee87c9969a998da0b585fbcf4e..839dab34d3ecb896e9076facac35c6c6d5b6659f 100644
--- a/chrome/browser/ui/webui/chrome_web_ui.cc
+++ b/chrome/browser/ui/webui/chrome_web_ui.cc
@@ -7,6 +7,12 @@
#include "chrome/browser/profiles/profile.h"
#include "content/browser/tab_contents/tab_contents.h"
+namespace {
+
+// Set to true if we prefer using webui implementations over native.
+bool use_more_webui = false;
+}
+
ChromeWebUI::ChromeWebUI(TabContents* contents)
: WebUI(contents),
force_bookmark_bar_visible_(false) {
@@ -18,3 +24,13 @@ ChromeWebUI::~ChromeWebUI() {
Profile* ChromeWebUI::GetProfile() const {
return Profile::FromBrowserContext(tab_contents()->browser_context());
}
+
+// static
+void ChromeWebUI::SetMoreWebUI(bool more_webui) {
+ use_more_webui = more_webui;
+}
+
+// static
+bool ChromeWebUI::IsMoreWebUI() {
+ return use_more_webui;
+}

Powered by Google App Engine
This is Rietveld 408576698