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

Side by Side Diff: chrome/browser/dom_ui/dom_ui_factory.cc

Issue 6017006: touch: Login code necessary only for chromeos. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: avoid nested ifdef's Created 9 years, 12 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/dom_ui/dom_ui_factory.h" 5 #include "chrome/browser/dom_ui/dom_ui_factory.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/about_flags.h" 8 #include "chrome/browser/about_flags.h"
9 #include "chrome/browser/dom_ui/bookmarks_ui.h" 9 #include "chrome/browser/dom_ui/bookmarks_ui.h"
10 #include "chrome/browser/dom_ui/bug_report_ui.h" 10 #include "chrome/browser/dom_ui/bug_report_ui.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 return &NewDOMUI<ExtensionsUI>; 150 return &NewDOMUI<ExtensionsUI>;
151 if (url.host() == chrome::kChromeUIHistoryHost) 151 if (url.host() == chrome::kChromeUIHistoryHost)
152 return &NewDOMUI<HistoryUI>; 152 return &NewDOMUI<HistoryUI>;
153 if (url.host() == chrome::kChromeUIHistory2Host) 153 if (url.host() == chrome::kChromeUIHistory2Host)
154 return &NewDOMUI<HistoryUI2>; 154 return &NewDOMUI<HistoryUI2>;
155 if (url.host() == chrome::kChromeUIFlagsHost) 155 if (url.host() == chrome::kChromeUIFlagsHost)
156 return &NewDOMUI<FlagsUI>; 156 return &NewDOMUI<FlagsUI>;
157 #if defined(TOUCH_UI) 157 #if defined(TOUCH_UI)
158 if (url.host() == chrome::kChromeUIKeyboardHost) 158 if (url.host() == chrome::kChromeUIKeyboardHost)
159 return &NewDOMUI<KeyboardUI>; 159 return &NewDOMUI<KeyboardUI>;
160 if (url.host() == chrome::kChromeUILoginHost)
161 return &NewDOMUI<chromeos::LoginUI>;
162 #endif 160 #endif
163 if (url.host() == chrome::kChromeUIGpuInternalsHost) 161 if (url.host() == chrome::kChromeUIGpuInternalsHost)
164 return &NewDOMUI<GpuInternalsUI>; 162 return &NewDOMUI<GpuInternalsUI>;
165 if (url.host() == chrome::kChromeUINetInternalsHost) 163 if (url.host() == chrome::kChromeUINetInternalsHost)
166 return &NewDOMUI<NetInternalsUI>; 164 return &NewDOMUI<NetInternalsUI>;
167 if (url.host() == chrome::kChromeUIPluginsHost) 165 if (url.host() == chrome::kChromeUIPluginsHost)
168 return &NewDOMUI<PluginsUI>; 166 return &NewDOMUI<PluginsUI>;
169 #if defined(ENABLE_REMOTING) 167 #if defined(ENABLE_REMOTING)
170 if (url.host() == chrome::kChromeUIRemotingHost) { 168 if (url.host() == chrome::kChromeUIRemotingHost) {
171 if (CommandLine::ForCurrentProcess()->HasSwitch( 169 if (CommandLine::ForCurrentProcess()->HasSwitch(
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 switches::kEnableTabbedOptions)) { 204 switches::kEnableTabbedOptions)) {
207 return &NewDOMUI<OptionsUI>; 205 return &NewDOMUI<OptionsUI>;
208 } 206 }
209 } 207 }
210 if (url.host() == chrome::kChromeUIPrintHost) { 208 if (url.host() == chrome::kChromeUIPrintHost) {
211 if (CommandLine::ForCurrentProcess()->HasSwitch( 209 if (CommandLine::ForCurrentProcess()->HasSwitch(
212 switches::kEnablePrintPreview)) { 210 switches::kEnablePrintPreview)) {
213 return &NewDOMUI<PrintPreviewUI>; 211 return &NewDOMUI<PrintPreviewUI>;
214 } 212 }
215 } 213 }
214 #endif // defined(OS_CHROMEOS)
215
216 #if defined(OS_CHROMEOS) && defined(TOUCH_UI)
217 if (url.host() == chrome::kChromeUILoginHost)
218 return &NewDOMUI<chromeos::LoginUI>;
216 #endif 219 #endif
217 220
218 if (url.spec() == chrome::kChromeUIConstrainedHTMLTestURL) 221 if (url.spec() == chrome::kChromeUIConstrainedHTMLTestURL)
219 return &NewDOMUI<ConstrainedHtmlUI>; 222 return &NewDOMUI<ConstrainedHtmlUI>;
220 223
221 return NULL; 224 return NULL;
222 } 225 }
223 226
224 // static 227 // static
225 DOMUITypeID DOMUIFactory::GetDOMUIType(Profile* profile, const GURL& url) { 228 DOMUITypeID DOMUIFactory::GetDOMUIType(Profile* profile, const GURL& url) {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 if (page_url.host() == chrome::kChromeUIPluginsHost) 329 if (page_url.host() == chrome::kChromeUIPluginsHost)
327 return PluginsUI::GetFaviconResourceBytes(); 330 return PluginsUI::GetFaviconResourceBytes();
328 331
329 #if defined(ENABLE_REMOTING) 332 #if defined(ENABLE_REMOTING)
330 if (page_url.host() == chrome::kChromeUIRemotingHost) 333 if (page_url.host() == chrome::kChromeUIRemotingHost)
331 return RemotingUI::GetFaviconResourceBytes(); 334 return RemotingUI::GetFaviconResourceBytes();
332 #endif 335 #endif
333 336
334 return NULL; 337 return NULL;
335 } 338 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698