| 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 12 matching lines...) Expand all Loading... |
| 23 #include "chrome/browser/ui/webui/downloads_ui.h" | 23 #include "chrome/browser/ui/webui/downloads_ui.h" |
| 24 #include "chrome/browser/ui/webui/extensions/extension_activity_ui.h" | 24 #include "chrome/browser/ui/webui/extensions/extension_activity_ui.h" |
| 25 #include "chrome/browser/ui/webui/extensions/extensions_ui.h" | 25 #include "chrome/browser/ui/webui/extensions/extensions_ui.h" |
| 26 #include "chrome/browser/ui/webui/feedback_ui.h" | 26 #include "chrome/browser/ui/webui/feedback_ui.h" |
| 27 #include "chrome/browser/ui/webui/task_manager/task_manager_ui.h" | 27 #include "chrome/browser/ui/webui/task_manager/task_manager_ui.h" |
| 28 #include "chrome/browser/ui/webui/flags_ui.h" | 28 #include "chrome/browser/ui/webui/flags_ui.h" |
| 29 #include "chrome/browser/ui/webui/flash_ui.h" | 29 #include "chrome/browser/ui/webui/flash_ui.h" |
| 30 #include "chrome/browser/ui/webui/generic_handler.h" | 30 #include "chrome/browser/ui/webui/generic_handler.h" |
| 31 #include "chrome/browser/ui/webui/gpu_internals_ui.h" | 31 #include "chrome/browser/ui/webui/gpu_internals_ui.h" |
| 32 #include "chrome/browser/ui/webui/history_ui.h" | 32 #include "chrome/browser/ui/webui/history_ui.h" |
| 33 #include "chrome/browser/ui/webui/web_dialog_ui.h" | 33 #include "ui/web_dialogs/web_dialog_ui.h" |
| 34 #include "chrome/browser/ui/webui/external_web_dialog_ui.h" |
| 34 #include "chrome/browser/ui/webui/inspect_ui.h" | 35 #include "chrome/browser/ui/webui/inspect_ui.h" |
| 35 #include "chrome/browser/ui/webui/media/media_internals_ui.h" | 36 #include "chrome/browser/ui/webui/media/media_internals_ui.h" |
| 36 #include "chrome/browser/ui/webui/net_internals/net_internals_ui.h" | 37 #include "chrome/browser/ui/webui/net_internals/net_internals_ui.h" |
| 37 #include "chrome/browser/ui/webui/network_action_predictor/network_action_predic
tor_ui.h" | 38 #include "chrome/browser/ui/webui/network_action_predictor/network_action_predic
tor_ui.h" |
| 38 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" | 39 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" |
| 39 #include "chrome/browser/ui/webui/omnibox/omnibox_ui.h" | 40 #include "chrome/browser/ui/webui/omnibox/omnibox_ui.h" |
| 40 #include "chrome/browser/ui/webui/options2/options_ui2.h" | 41 #include "chrome/browser/ui/webui/options2/options_ui2.h" |
| 41 #include "chrome/browser/ui/webui/plugins_ui.h" | 42 #include "chrome/browser/ui/webui/plugins_ui.h" |
| 42 #include "chrome/browser/ui/webui/policy_ui.h" | 43 #include "chrome/browser/ui/webui/policy_ui.h" |
| 43 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" | 44 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 // We must compare hosts only since some of the Web UIs append extra stuff | 163 // We must compare hosts only since some of the Web UIs append extra stuff |
| 163 // after the host name. | 164 // after the host name. |
| 164 if (url.host() == chrome::kChromeUIBookmarksHost) | 165 if (url.host() == chrome::kChromeUIBookmarksHost) |
| 165 return &NewWebUI<BookmarksUI>; | 166 return &NewWebUI<BookmarksUI>; |
| 166 // All platform builds of Chrome will need to have a cloud printing | 167 // All platform builds of Chrome will need to have a cloud printing |
| 167 // dialog as backup. It's just that on Chrome OS, it's the only | 168 // dialog as backup. It's just that on Chrome OS, it's the only |
| 168 // print dialog. | 169 // print dialog. |
| 169 if (url.host() == chrome::kChromeUICloudPrintResourcesHost) | 170 if (url.host() == chrome::kChromeUICloudPrintResourcesHost) |
| 170 return &NewWebUI<ExternalWebDialogUI>; | 171 return &NewWebUI<ExternalWebDialogUI>; |
| 171 if (url.host() == chrome::kChromeUICloudPrintSetupHost) | 172 if (url.host() == chrome::kChromeUICloudPrintSetupHost) |
| 172 return &NewWebUI<WebDialogUI>; | 173 return &NewWebUI<views::WebDialogUI>; |
| 173 if (url.spec() == chrome::kChromeUIConstrainedHTMLTestURL) | 174 if (url.spec() == chrome::kChromeUIConstrainedHTMLTestURL) |
| 174 return &NewWebUI<ConstrainedWebDialogUI>; | 175 return &NewWebUI<ConstrainedWebDialogUI>; |
| 175 if (url.host() == chrome::kChromeUICrashesHost) | 176 if (url.host() == chrome::kChromeUICrashesHost) |
| 176 return &NewWebUI<CrashesUI>; | 177 return &NewWebUI<CrashesUI>; |
| 177 if (url.host() == chrome::kChromeUIDevToolsHost) | 178 if (url.host() == chrome::kChromeUIDevToolsHost) |
| 178 return &NewWebUI<DevToolsUI>; | 179 return &NewWebUI<DevToolsUI>; |
| 179 if (url.host() == chrome::kChromeUIDialogHost) | 180 if (url.host() == chrome::kChromeUIDialogHost) |
| 180 return &NewWebUI<ConstrainedWebDialogUI>; | 181 return &NewWebUI<ConstrainedWebDialogUI>; |
| 181 if (url.host() == chrome::kChromeUIExtensionsFrameHost) | 182 if (url.host() == chrome::kChromeUIExtensionsFrameHost) |
| 182 return &NewWebUI<ExtensionsUI>; | 183 return &NewWebUI<ExtensionsUI>; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 196 return &NewWebUI<OmniboxUI>; | 197 return &NewWebUI<OmniboxUI>; |
| 197 if (url.host() == chrome::kChromeUIProfilerHost) | 198 if (url.host() == chrome::kChromeUIProfilerHost) |
| 198 return &NewWebUI<ProfilerUI>; | 199 return &NewWebUI<ProfilerUI>; |
| 199 if (url.host() == chrome::kChromeUIQuotaInternalsHost) | 200 if (url.host() == chrome::kChromeUIQuotaInternalsHost) |
| 200 return &NewWebUI<QuotaInternalsUI>; | 201 return &NewWebUI<QuotaInternalsUI>; |
| 201 if (url.host() == chrome::kChromeUISessionsHost) | 202 if (url.host() == chrome::kChromeUISessionsHost) |
| 202 return &NewWebUI<SessionsUI>; | 203 return &NewWebUI<SessionsUI>; |
| 203 if (url.host() == chrome::kChromeUISyncInternalsHost) | 204 if (url.host() == chrome::kChromeUISyncInternalsHost) |
| 204 return &NewWebUI<SyncInternalsUI>; | 205 return &NewWebUI<SyncInternalsUI>; |
| 205 if (url.host() == chrome::kChromeUISyncResourcesHost) | 206 if (url.host() == chrome::kChromeUISyncResourcesHost) |
| 206 return &NewWebUI<WebDialogUI>; | 207 return &NewWebUI<views::WebDialogUI>; |
| 207 if (url.host() == chrome::kChromeUITracingHost) | 208 if (url.host() == chrome::kChromeUITracingHost) |
| 208 return &NewWebUI<TracingUI>; | 209 return &NewWebUI<TracingUI>; |
| 209 if (url.host() == chrome::kChromeUIUberFrameHost) | 210 if (url.host() == chrome::kChromeUIUberFrameHost) |
| 210 return &NewWebUI<UberFrameUI>; | 211 return &NewWebUI<UberFrameUI>; |
| 211 if (url.host() == chrome::kChromeUIUberHost) | 212 if (url.host() == chrome::kChromeUIUberHost) |
| 212 return &NewWebUI<UberUI>; | 213 return &NewWebUI<UberUI>; |
| 213 | 214 |
| 214 /**************************************************************************** | 215 /**************************************************************************** |
| 215 * OS Specific #defines | 216 * OS Specific #defines |
| 216 ***************************************************************************/ | 217 ***************************************************************************/ |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 if (page_url.host() == chrome::kChromeUISettingsFrameHost) | 503 if (page_url.host() == chrome::kChromeUISettingsFrameHost) |
| 503 return options2::OptionsUI::GetFaviconResourceBytes(); | 504 return options2::OptionsUI::GetFaviconResourceBytes(); |
| 504 | 505 |
| 505 // Android doesn't use the plugins pages. | 506 // Android doesn't use the plugins pages. |
| 506 if (page_url.host() == chrome::kChromeUIPluginsHost) | 507 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 507 return PluginsUI::GetFaviconResourceBytes(); | 508 return PluginsUI::GetFaviconResourceBytes(); |
| 508 #endif | 509 #endif |
| 509 | 510 |
| 510 return NULL; | 511 return NULL; |
| 511 } | 512 } |
| OLD | NEW |