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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
221 if (url.host() == chrome::kChromeUIInspectHost) | 221 if (url.host() == chrome::kChromeUIInspectHost) |
222 return &NewWebUI<InspectUI>; | 222 return &NewWebUI<InspectUI>; |
223 | 223 |
224 /**************************************************************************** | 224 /**************************************************************************** |
225 * OS Specific #defines | 225 * OS Specific #defines |
226 ***************************************************************************/ | 226 ***************************************************************************/ |
227 #if !defined(OS_ANDROID) | 227 #if !defined(OS_ANDROID) |
228 // These pages are implemented with native UI elements on Android. | 228 // These pages are implemented with native UI elements on Android. |
229 if (url.host() == chrome::kChromeUIDownloadsHost) | 229 if (url.host() == chrome::kChromeUIDownloadsHost) |
230 return &NewWebUI<DownloadsUI>; | 230 return &NewWebUI<DownloadsUI>; |
231 // Android doesn't use the Options pages. | |
Dan Beam
2012/03/23 03:25:31
merge conflict?
| |
231 if (url.host() == chrome::kChromeUIFeedbackHost) | 232 if (url.host() == chrome::kChromeUIFeedbackHost) |
232 return &NewWebUI<FeedbackUI>; | 233 return &NewWebUI<FeedbackUI>; |
233 if (url.host() == chrome::kChromeUIHelpFrameHost) | 234 if (url.host() == chrome::kChromeUIHelpFrameHost) |
234 return &NewWebUI<HelpUI>; | 235 return &NewWebUI<HelpUI>; |
235 if (url.host() == chrome::kChromeUISettingsFrameHost) | 236 if (url.host() == chrome::kChromeUISettingsFrameHost) |
236 return &NewWebUI<options2::OptionsUI>; | 237 return &NewWebUI<options2::OptionsUI>; |
237 if (url.host() == chrome::kChromeUISettingsHost) | 238 // Android doesn't support print/print-preview. |
238 return &NewWebUI<OptionsUI>; | |
239 if (url.host() == chrome::kChromeUIPrintHost && | 239 if (url.host() == chrome::kChromeUIPrintHost && |
240 !g_browser_process->local_state()->GetBoolean( | 240 !g_browser_process->local_state()->GetBoolean( |
241 prefs::kPrintPreviewDisabled)) { | 241 prefs::kPrintPreviewDisabled)) { |
242 return &NewWebUI<PrintPreviewUI>; | 242 return &NewWebUI<PrintPreviewUI>; |
243 } | 243 } |
244 #endif | 244 #endif |
245 #if defined(OS_WIN) | 245 #if defined(OS_WIN) |
246 if (url.host() == chrome::kChromeUIConflictsHost) | 246 if (url.host() == chrome::kChromeUIConflictsHost) |
247 return &NewWebUI<ConflictsUI>; | 247 return &NewWebUI<ConflictsUI>; |
248 #endif | 248 #endif |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
473 if (page_url.host() == chrome::kChromeUIFlagsHost) | 473 if (page_url.host() == chrome::kChromeUIFlagsHost) |
474 return FlagsUI::GetFaviconResourceBytes(); | 474 return FlagsUI::GetFaviconResourceBytes(); |
475 | 475 |
476 if (page_url.host() == chrome::kChromeUISessionsHost) | 476 if (page_url.host() == chrome::kChromeUISessionsHost) |
477 return SessionsUI::GetFaviconResourceBytes(); | 477 return SessionsUI::GetFaviconResourceBytes(); |
478 | 478 |
479 if (page_url.host() == chrome::kChromeUIFlashHost) | 479 if (page_url.host() == chrome::kChromeUIFlashHost) |
480 return FlashUI::GetFaviconResourceBytes(); | 480 return FlashUI::GetFaviconResourceBytes(); |
481 | 481 |
482 #if !defined(OS_ANDROID) | 482 #if !defined(OS_ANDROID) |
483 // Android uses the native download manager | 483 // Android uses the native download manager. |
484 if (page_url.host() == chrome::kChromeUIDownloadsHost) | 484 if (page_url.host() == chrome::kChromeUIDownloadsHost) |
485 return DownloadsUI::GetFaviconResourceBytes(); | 485 return DownloadsUI::GetFaviconResourceBytes(); |
486 | 486 |
487 // Android doesn't use the Options/Options2 pages | 487 // Android doesn't use the Options pages. |
488 if (page_url.host() == chrome::kChromeUISettingsHost) | |
489 return OptionsUI::GetFaviconResourceBytes(); | |
490 | |
491 if (page_url.host() == chrome::kChromeUISettingsFrameHost) | 488 if (page_url.host() == chrome::kChromeUISettingsFrameHost) |
492 return options2::OptionsUI::GetFaviconResourceBytes(); | 489 return options2::OptionsUI::GetFaviconResourceBytes(); |
493 #endif | 490 #endif |
494 | 491 |
495 if (page_url.host() == chrome::kChromeUIPluginsHost) | 492 if (page_url.host() == chrome::kChromeUIPluginsHost) |
496 return PluginsUI::GetFaviconResourceBytes(); | 493 return PluginsUI::GetFaviconResourceBytes(); |
497 | 494 |
498 return NULL; | 495 return NULL; |
499 } | 496 } |
OLD | NEW |