| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_factory.h" | 5 #include "chrome/browser/ui/webui/chrome_web_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/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 23 matching lines...) Expand all Loading... |
| 34 #include "chrome/browser/ui/webui/options/options_ui.h" | 34 #include "chrome/browser/ui/webui/options/options_ui.h" |
| 35 #include "chrome/browser/ui/webui/plugins_ui.h" | 35 #include "chrome/browser/ui/webui/plugins_ui.h" |
| 36 #include "chrome/browser/ui/webui/policy_ui.h" | 36 #include "chrome/browser/ui/webui/policy_ui.h" |
| 37 #include "chrome/browser/ui/webui/print_preview_ui.h" | 37 #include "chrome/browser/ui/webui/print_preview_ui.h" |
| 38 #include "chrome/browser/ui/webui/profiler_ui.h" | 38 #include "chrome/browser/ui/webui/profiler_ui.h" |
| 39 #include "chrome/browser/ui/webui/quota_internals_ui.h" | 39 #include "chrome/browser/ui/webui/quota_internals_ui.h" |
| 40 #include "chrome/browser/ui/webui/sessions_ui.h" | 40 #include "chrome/browser/ui/webui/sessions_ui.h" |
| 41 #include "chrome/browser/ui/webui/sync_internals_ui.h" | 41 #include "chrome/browser/ui/webui/sync_internals_ui.h" |
| 42 #include "chrome/browser/ui/webui/test_chrome_web_ui_factory.h" | 42 #include "chrome/browser/ui/webui/test_chrome_web_ui_factory.h" |
| 43 #include "chrome/browser/ui/webui/tracing_ui.h" | 43 #include "chrome/browser/ui/webui/tracing_ui.h" |
| 44 #include "chrome/browser/ui/webui/uber/uber_ui.h" |
| 44 #include "chrome/browser/ui/webui/workers_ui.h" | 45 #include "chrome/browser/ui/webui/workers_ui.h" |
| 45 #include "chrome/common/chrome_switches.h" | 46 #include "chrome/common/chrome_switches.h" |
| 46 #include "chrome/common/extensions/extension_constants.h" | 47 #include "chrome/common/extensions/extension_constants.h" |
| 47 #include "chrome/common/url_constants.h" | 48 #include "chrome/common/url_constants.h" |
| 48 #include "content/browser/tab_contents/tab_contents.h" | 49 #include "content/browser/tab_contents/tab_contents.h" |
| 49 #include "content/browser/webui/web_ui.h" | 50 #include "content/browser/webui/web_ui.h" |
| 50 #include "googleurl/src/gurl.h" | 51 #include "googleurl/src/gurl.h" |
| 51 | 52 |
| 52 #if defined(OS_CHROMEOS) | 53 #if defined(OS_CHROMEOS) |
| 53 #include "chrome/browser/ui/webui/chromeos/choose_mobile_network_ui.h" | 54 #include "chrome/browser/ui/webui/chromeos/choose_mobile_network_ui.h" |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 if (url.host() == chrome::kChromeUIMediaInternalsHost) | 190 if (url.host() == chrome::kChromeUIMediaInternalsHost) |
| 190 return &NewWebUI<MediaInternalsUI>; | 191 return &NewWebUI<MediaInternalsUI>; |
| 191 if (url.host() == chrome::kChromeUINetInternalsHost) | 192 if (url.host() == chrome::kChromeUINetInternalsHost) |
| 192 return &NewWebUI<NetInternalsUI>; | 193 return &NewWebUI<NetInternalsUI>; |
| 193 #if defined(ENABLE_CONFIGURATION_POLICY) | 194 #if defined(ENABLE_CONFIGURATION_POLICY) |
| 194 if (url.host() == chrome::kChromeUIPolicyHost) | 195 if (url.host() == chrome::kChromeUIPolicyHost) |
| 195 return &NewWebUI<PolicyUI>; | 196 return &NewWebUI<PolicyUI>; |
| 196 #endif | 197 #endif |
| 197 if (url.host() == chrome::kChromeUIPluginsHost) | 198 if (url.host() == chrome::kChromeUIPluginsHost) |
| 198 return &NewWebUI<PluginsUI>; | 199 return &NewWebUI<PluginsUI>; |
| 200 if (url.host() == chrome::kChromeUIProfilerHost) |
| 201 return &NewWebUI<ProfilerUI>; |
| 199 if (url.host() == chrome::kChromeUIQuotaInternalsHost) | 202 if (url.host() == chrome::kChromeUIQuotaInternalsHost) |
| 200 return &NewWebUI<QuotaInternalsUI>; | 203 return &NewWebUI<QuotaInternalsUI>; |
| 201 if (url.host() == chrome::kChromeUISSLClientCertificateSelectorHost) | 204 if (url.host() == chrome::kChromeUISSLClientCertificateSelectorHost) |
| 202 return &NewWebUI<ConstrainedHtmlUI>; | 205 return &NewWebUI<ConstrainedHtmlUI>; |
| 203 if (url.host() == chrome::kChromeUISessionsHost) | 206 if (url.host() == chrome::kChromeUISessionsHost) |
| 204 return &NewWebUI<SessionsUI>; | 207 return &NewWebUI<SessionsUI>; |
| 205 if (url.host() == chrome::kChromeUISettingsHost) | 208 if (url.host() == chrome::kChromeUISettingsHost) |
| 206 return &NewWebUI<OptionsUI>; | 209 return &NewWebUI<OptionsUI>; |
| 207 if (url.host() == chrome::kChromeUISyncInternalsHost) | 210 if (url.host() == chrome::kChromeUISyncInternalsHost) |
| 208 return &NewWebUI<SyncInternalsUI>; | 211 return &NewWebUI<SyncInternalsUI>; |
| 209 if (url.host() == chrome::kChromeUITaskManagerHost) | 212 if (url.host() == chrome::kChromeUITaskManagerHost) |
| 210 return &NewWebUI<TaskManagerUI>; | 213 return &NewWebUI<TaskManagerUI>; |
| 211 if (url.host() == chrome::kChromeUITracingHost) | 214 if (url.host() == chrome::kChromeUITracingHost) |
| 212 return &NewWebUI<TracingUI>; | 215 return &NewWebUI<TracingUI>; |
| 213 if (url.host() == chrome::kChromeUIProfilerHost) | 216 if (url.host() == chrome::kChromeUIUberHost) |
| 214 return &NewWebUI<ProfilerUI>; | 217 return &NewWebUI<UberUI>; |
| 215 if (url.host() == chrome::kChromeUIWorkersHost) | 218 if (url.host() == chrome::kChromeUIWorkersHost) |
| 216 return &NewWebUI<WorkersUI>; | 219 return &NewWebUI<WorkersUI>; |
| 217 | 220 |
| 218 #if defined(OS_CHROMEOS) | 221 #if defined(OS_CHROMEOS) |
| 219 if (url.host() == chrome::kChromeUIActiveDownloadsHost) | 222 if (url.host() == chrome::kChromeUIActiveDownloadsHost) |
| 220 return &NewWebUI<ActiveDownloadsUI>; | 223 return &NewWebUI<ActiveDownloadsUI>; |
| 221 if (url.host() == chrome::kChromeUIChooseMobileNetworkHost) | 224 if (url.host() == chrome::kChromeUIChooseMobileNetworkHost) |
| 222 return &NewWebUI<chromeos::ChooseMobileNetworkUI>; | 225 return &NewWebUI<chromeos::ChooseMobileNetworkUI>; |
| 223 if (url.host() == chrome::kChromeUIImageBurnerHost) | 226 if (url.host() == chrome::kChromeUIImageBurnerHost) |
| 224 return &NewWebUI<ImageBurnUI>; | 227 return &NewWebUI<ImageBurnUI>; |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 return FlashUI::GetFaviconResourceBytes(); | 440 return FlashUI::GetFaviconResourceBytes(); |
| 438 | 441 |
| 439 if (page_url.host() == chrome::kChromeUISettingsHost) | 442 if (page_url.host() == chrome::kChromeUISettingsHost) |
| 440 return OptionsUI::GetFaviconResourceBytes(); | 443 return OptionsUI::GetFaviconResourceBytes(); |
| 441 | 444 |
| 442 if (page_url.host() == chrome::kChromeUIPluginsHost) | 445 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 443 return PluginsUI::GetFaviconResourceBytes(); | 446 return PluginsUI::GetFaviconResourceBytes(); |
| 444 | 447 |
| 445 return NULL; | 448 return NULL; |
| 446 } | 449 } |
| OLD | NEW |