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

Side by Side Diff: chrome/browser/ui/webui/chrome_web_ui.cc

Issue 7957002: Reland add --use-more-webui runtime flag to toggle WebUI replacements for native dialogs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with trunk. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/chrome_web_ui.h" 5 #include "chrome/browser/ui/webui/chrome_web_ui.h"
6 6
7 #include "base/command_line.h"
7 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/common/chrome_switches.h"
8 #include "content/browser/tab_contents/tab_contents.h" 10 #include "content/browser/tab_contents/tab_contents.h"
9 11
12 #if defined(TOOLKIT_VIEWS)
13 #include "views/widget/widget.h"
14 #endif
15
10 ChromeWebUI::ChromeWebUI(TabContents* contents) 16 ChromeWebUI::ChromeWebUI(TabContents* contents)
11 : WebUI(contents), 17 : WebUI(contents),
12 force_bookmark_bar_visible_(false) { 18 force_bookmark_bar_visible_(false) {
13 } 19 }
14 20
15 ChromeWebUI::~ChromeWebUI() { 21 ChromeWebUI::~ChromeWebUI() {
16 } 22 }
17 23
18 Profile* ChromeWebUI::GetProfile() const { 24 Profile* ChromeWebUI::GetProfile() const {
19 return Profile::FromBrowserContext(tab_contents()->browser_context()); 25 return Profile::FromBrowserContext(tab_contents()->browser_context());
20 } 26 }
27
28 // static
29 bool ChromeWebUI::IsMoreWebUI() {
30 bool more_webui = CommandLine::ForCurrentProcess()->HasSwitch(
31 switches::kUseMoreWebUI);
32 #if defined(TOOLKIT_VIEWS)
33 more_webui |= views::Widget::IsPureViews();
34 #endif
35 return more_webui;
36 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chrome_web_ui.h ('k') | chrome/browser/ui/webui/chrome_web_ui_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698