OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_controller_factory.h" | 5 #include "chrome/browser/ui/webui/chrome_web_ui_controller_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/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
173 if (url.host() == chrome::kChromeUICloudPrintSetupHost) | 173 if (url.host() == chrome::kChromeUICloudPrintSetupHost) |
174 return &NewWebUI<HtmlDialogUI>; | 174 return &NewWebUI<HtmlDialogUI>; |
175 if (url.spec() == chrome::kChromeUIConstrainedHTMLTestURL) | 175 if (url.spec() == chrome::kChromeUIConstrainedHTMLTestURL) |
176 return &NewWebUI<ConstrainedHtmlUI>; | 176 return &NewWebUI<ConstrainedHtmlUI>; |
177 if (url.host() == chrome::kChromeUICrashesHost) | 177 if (url.host() == chrome::kChromeUICrashesHost) |
178 return &NewWebUI<CrashesUI>; | 178 return &NewWebUI<CrashesUI>; |
179 if (url.host() == chrome::kChromeUIDevToolsHost) | 179 if (url.host() == chrome::kChromeUIDevToolsHost) |
180 return &NewWebUI<DevToolsUI>; | 180 return &NewWebUI<DevToolsUI>; |
181 if (url.host() == chrome::kChromeUIDialogHost) | 181 if (url.host() == chrome::kChromeUIDialogHost) |
182 return &NewWebUI<ConstrainedHtmlUI>; | 182 return &NewWebUI<ConstrainedHtmlUI>; |
183 if (url.host() == chrome::kChromeUIDownloadsHost) | |
184 return &NewWebUI<DownloadsUI>; | |
185 if (url.host() == chrome::kChromeUIExtensionsFrameHost) | 183 if (url.host() == chrome::kChromeUIExtensionsFrameHost) |
186 return &NewWebUI<ExtensionsUI>; | 184 return &NewWebUI<ExtensionsUI>; |
187 if (url.host() == chrome::kChromeUIFeedbackHost) | 185 if (url.host() == chrome::kChromeUIFeedbackHost) |
188 return &NewWebUI<FeedbackUI>; | 186 return &NewWebUI<FeedbackUI>; |
189 if (url.host() == chrome::kChromeUIFlagsHost) | 187 if (url.host() == chrome::kChromeUIFlagsHost) |
190 return &NewWebUI<FlagsUI>; | 188 return &NewWebUI<FlagsUI>; |
191 if (url.host() == chrome::kChromeUIFlashHost) | 189 if (url.host() == chrome::kChromeUIFlashHost) |
192 return &NewWebUI<FlashUI>; | 190 return &NewWebUI<FlashUI>; |
193 if (url.host() == chrome::kChromeUIGpuInternalsHost) | 191 if (url.host() == chrome::kChromeUIGpuInternalsHost) |
194 return &NewWebUI<GpuInternalsUI>; | 192 return &NewWebUI<GpuInternalsUI>; |
(...skipping 29 matching lines...) Expand all Loading... | |
224 return &NewWebUI<UberFrameUI>; | 222 return &NewWebUI<UberFrameUI>; |
225 if (url.host() == chrome::kChromeUIUberHost) | 223 if (url.host() == chrome::kChromeUIUberHost) |
226 return &NewWebUI<UberUI>; | 224 return &NewWebUI<UberUI>; |
227 if (url.host() == chrome::kChromeUIWorkersHost) | 225 if (url.host() == chrome::kChromeUIWorkersHost) |
228 return &NewWebUI<WorkersUI>; | 226 return &NewWebUI<WorkersUI>; |
229 | 227 |
230 /**************************************************************************** | 228 /**************************************************************************** |
231 * OS Specific #defines | 229 * OS Specific #defines |
232 ***************************************************************************/ | 230 ***************************************************************************/ |
233 #if !defined(OS_ANDROID) | 231 #if !defined(OS_ANDROID) |
232 // Android uses the native download manager | |
Evan Stade
2012/03/14 21:13:40
. at end of this comment.
| |
233 if (url.host() == chrome::kChromeUIDownloadsHost) | |
234 return &NewWebUI<DownloadsUI>; | |
235 | |
Evan Stade
2012/03/14 21:13:40
no newline
| |
234 // Android doesn't use the Options/Options2 pages | 236 // Android doesn't use the Options/Options2 pages |
Evan Stade
2012/03/14 21:13:40
. here too.
| |
235 if (url.host() == chrome::kChromeUISettingsFrameHost) | 237 if (url.host() == chrome::kChromeUISettingsFrameHost) |
236 return &NewWebUI<options2::OptionsUI>; | 238 return &NewWebUI<options2::OptionsUI>; |
237 if (url.host() == chrome::kChromeUISettingsHost) | 239 if (url.host() == chrome::kChromeUISettingsHost) |
238 return &NewWebUI<OptionsUI>; | 240 return &NewWebUI<OptionsUI>; |
239 #endif | 241 #endif |
240 #if defined(OS_WIN) | 242 #if defined(OS_WIN) |
241 if (url.host() == chrome::kChromeUIConflictsHost) | 243 if (url.host() == chrome::kChromeUIConflictsHost) |
242 return &NewWebUI<ConflictsUI>; | 244 return &NewWebUI<ConflictsUI>; |
243 #endif | 245 #endif |
244 #if (defined(USE_NSS) || defined(USE_OPENSSL)) && defined(USE_AURA) | 246 #if (defined(USE_NSS) || defined(USE_OPENSSL)) && defined(USE_AURA) |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
469 return NULL; | 471 return NULL; |
470 | 472 |
471 #if defined(OS_WIN) | 473 #if defined(OS_WIN) |
472 if (page_url.host() == chrome::kChromeUIConflictsHost) | 474 if (page_url.host() == chrome::kChromeUIConflictsHost) |
473 return ConflictsUI::GetFaviconResourceBytes(); | 475 return ConflictsUI::GetFaviconResourceBytes(); |
474 #endif | 476 #endif |
475 | 477 |
476 if (page_url.host() == chrome::kChromeUICrashesHost) | 478 if (page_url.host() == chrome::kChromeUICrashesHost) |
477 return CrashesUI::GetFaviconResourceBytes(); | 479 return CrashesUI::GetFaviconResourceBytes(); |
478 | 480 |
479 if (page_url.host() == chrome::kChromeUIDownloadsHost) | |
480 return DownloadsUI::GetFaviconResourceBytes(); | |
481 | |
482 if (page_url.host() == chrome::kChromeUIHistoryHost) | 481 if (page_url.host() == chrome::kChromeUIHistoryHost) |
483 return HistoryUI::GetFaviconResourceBytes(); | 482 return HistoryUI::GetFaviconResourceBytes(); |
484 | 483 |
485 if (page_url.host() == chrome::kChromeUIFlagsHost) | 484 if (page_url.host() == chrome::kChromeUIFlagsHost) |
486 return FlagsUI::GetFaviconResourceBytes(); | 485 return FlagsUI::GetFaviconResourceBytes(); |
487 | 486 |
488 if (page_url.host() == chrome::kChromeUISessionsHost) | 487 if (page_url.host() == chrome::kChromeUISessionsHost) |
489 return SessionsUI::GetFaviconResourceBytes(); | 488 return SessionsUI::GetFaviconResourceBytes(); |
490 | 489 |
491 if (page_url.host() == chrome::kChromeUIFlashHost) | 490 if (page_url.host() == chrome::kChromeUIFlashHost) |
492 return FlashUI::GetFaviconResourceBytes(); | 491 return FlashUI::GetFaviconResourceBytes(); |
493 | 492 |
494 #if !defined(OS_ANDROID) | 493 #if !defined(OS_ANDROID) |
494 // Android uses the native download manager | |
495 if (page_url.host() == chrome::kChromeUIDownloadsHost) | |
496 return DownloadsUI::GetFaviconResourceBytes(); | |
497 | |
495 // Android doesn't use the Options/Options2 pages | 498 // Android doesn't use the Options/Options2 pages |
496 if (page_url.host() == chrome::kChromeUISettingsHost) | 499 if (page_url.host() == chrome::kChromeUISettingsHost) |
497 return OptionsUI::GetFaviconResourceBytes(); | 500 return OptionsUI::GetFaviconResourceBytes(); |
498 | 501 |
499 if (page_url.host() == chrome::kChromeUISettingsFrameHost) | 502 if (page_url.host() == chrome::kChromeUISettingsFrameHost) |
500 return options2::OptionsUI::GetFaviconResourceBytes(); | 503 return options2::OptionsUI::GetFaviconResourceBytes(); |
501 #endif | 504 #endif |
502 | 505 |
503 if (page_url.host() == chrome::kChromeUIPluginsHost) | 506 if (page_url.host() == chrome::kChromeUIPluginsHost) |
504 return PluginsUI::GetFaviconResourceBytes(); | 507 return PluginsUI::GetFaviconResourceBytes(); |
505 | 508 |
506 return NULL; | 509 return NULL; |
507 } | 510 } |
OLD | NEW |