| 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/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
| 10 #include "chrome/browser/extensions/extension_web_ui.h" | 10 #include "chrome/browser/extensions/extension_web_ui.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 #include "chrome/common/extensions/extension_switch_utils.h" | 56 #include "chrome/common/extensions/extension_switch_utils.h" |
| 57 #include "chrome/common/pref_names.h" | 57 #include "chrome/common/pref_names.h" |
| 58 #include "chrome/common/url_constants.h" | 58 #include "chrome/common/url_constants.h" |
| 59 #include "content/public/browser/web_contents.h" | 59 #include "content/public/browser/web_contents.h" |
| 60 #include "content/public/browser/web_ui.h" | 60 #include "content/public/browser/web_ui.h" |
| 61 #include "content/public/common/content_client.h" | 61 #include "content/public/common/content_client.h" |
| 62 #include "googleurl/src/gurl.h" | 62 #include "googleurl/src/gurl.h" |
| 63 #include "ui/web_dialogs/constrained_web_dialog_ui.h" | 63 #include "ui/web_dialogs/constrained_web_dialog_ui.h" |
| 64 #include "ui/web_dialogs/web_dialog_ui.h" | 64 #include "ui/web_dialogs/web_dialog_ui.h" |
| 65 | 65 |
| 66 #if defined(OS_ANDROID) |
| 67 #include "chrome/browser/ui/webui/welcome_ui_android.h" |
| 68 #endif |
| 69 |
| 66 #if defined(OS_CHROMEOS) | 70 #if defined(OS_CHROMEOS) |
| 67 #include "chrome/browser/ui/webui/chromeos/drive_internals_ui.h" | 71 #include "chrome/browser/ui/webui/chromeos/drive_internals_ui.h" |
| 68 #include "chrome/browser/ui/webui/chromeos/choose_mobile_network_ui.h" | 72 #include "chrome/browser/ui/webui/chromeos/choose_mobile_network_ui.h" |
| 69 #include "chrome/browser/ui/webui/chromeos/cryptohome_ui.h" | 73 #include "chrome/browser/ui/webui/chromeos/cryptohome_ui.h" |
| 70 #include "chrome/browser/ui/webui/chromeos/diagnostics/diagnostics_ui.h" | 74 #include "chrome/browser/ui/webui/chromeos/diagnostics/diagnostics_ui.h" |
| 71 #include "chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.h" | 75 #include "chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.h" |
| 72 #include "chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.h" | 76 #include "chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.h" |
| 73 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 77 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
| 74 #include "chrome/browser/ui/webui/chromeos/mobile_setup_ui.h" | 78 #include "chrome/browser/ui/webui/chromeos/mobile_setup_ui.h" |
| 75 #include "chrome/browser/ui/webui/chromeos/proxy_settings_ui.h" | 79 #include "chrome/browser/ui/webui/chromeos/proxy_settings_ui.h" |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 if (url.host() == chrome::kChromeUITracingHost) | 230 if (url.host() == chrome::kChromeUITracingHost) |
| 227 return &NewWebUI<TracingUI>; | 231 return &NewWebUI<TracingUI>; |
| 228 if (url.host() == chrome::kChromeUIUberFrameHost) | 232 if (url.host() == chrome::kChromeUIUberFrameHost) |
| 229 return &NewWebUI<UberFrameUI>; | 233 return &NewWebUI<UberFrameUI>; |
| 230 if (url.host() == chrome::kChromeUIUberHost) | 234 if (url.host() == chrome::kChromeUIUberHost) |
| 231 return &NewWebUI<UberUI>; | 235 return &NewWebUI<UberUI>; |
| 232 | 236 |
| 233 /**************************************************************************** | 237 /**************************************************************************** |
| 234 * OS Specific #defines | 238 * OS Specific #defines |
| 235 ***************************************************************************/ | 239 ***************************************************************************/ |
| 236 #if !defined(OS_ANDROID) | 240 #if defined(OS_ANDROID) |
| 241 if (url.host() == chrome::kChromeUIWelcomeHost) |
| 242 return &NewWebUI<WelcomeUI>; |
| 243 #else |
| 237 // These pages are implemented with native UI elements on Android. | 244 // These pages are implemented with native UI elements on Android. |
| 238 if (url.host() == chrome::kChromeUIDownloadsHost) | 245 if (url.host() == chrome::kChromeUIDownloadsHost) |
| 239 return &NewWebUI<DownloadsUI>; | 246 return &NewWebUI<DownloadsUI>; |
| 240 if (url.host() == chrome::kChromeUIFeedbackHost) | 247 if (url.host() == chrome::kChromeUIFeedbackHost) |
| 241 return &NewWebUI<FeedbackUI>; | 248 return &NewWebUI<FeedbackUI>; |
| 242 if (url.host() == chrome::kChromeUIHelpFrameHost) | 249 if (url.host() == chrome::kChromeUIHelpFrameHost) |
| 243 return &NewWebUI<HelpUI>; | 250 return &NewWebUI<HelpUI>; |
| 244 if (url.host() == chrome::kChromeUISettingsFrameHost) | 251 if (url.host() == chrome::kChromeUISettingsFrameHost) |
| 245 return &NewWebUI<options2::OptionsUI>; | 252 return &NewWebUI<options2::OptionsUI>; |
| 246 if (url.host() == chrome::kChromeUISuggestionsInternalsHost) | 253 if (url.host() == chrome::kChromeUISuggestionsInternalsHost) |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 if (page_url.host() == chrome::kChromeUISettingsFrameHost) | 541 if (page_url.host() == chrome::kChromeUISettingsFrameHost) |
| 535 return options2::OptionsUI::GetFaviconResourceBytes(); | 542 return options2::OptionsUI::GetFaviconResourceBytes(); |
| 536 | 543 |
| 537 // Android doesn't use the plugins pages. | 544 // Android doesn't use the plugins pages. |
| 538 if (page_url.host() == chrome::kChromeUIPluginsHost) | 545 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 539 return PluginsUI::GetFaviconResourceBytes(); | 546 return PluginsUI::GetFaviconResourceBytes(); |
| 540 #endif | 547 #endif |
| 541 | 548 |
| 542 return NULL; | 549 return NULL; |
| 543 } | 550 } |
| OLD | NEW |