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 16 matching lines...) Expand all Loading... |
27 #include "chrome/browser/ui/webui/html_dialog_ui.h" | 27 #include "chrome/browser/ui/webui/html_dialog_ui.h" |
28 #include "chrome/browser/ui/webui/hung_renderer_dialog_ui.h" | 28 #include "chrome/browser/ui/webui/hung_renderer_dialog_ui.h" |
29 #include "chrome/browser/ui/webui/input_window_dialog_ui.h" | 29 #include "chrome/browser/ui/webui/input_window_dialog_ui.h" |
30 #include "chrome/browser/ui/webui/media/media_internals_ui.h" | 30 #include "chrome/browser/ui/webui/media/media_internals_ui.h" |
31 #include "chrome/browser/ui/webui/net_internals_ui.h" | 31 #include "chrome/browser/ui/webui/net_internals_ui.h" |
32 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" | 32 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" |
33 #include "chrome/browser/ui/webui/options/options_ui.h" | 33 #include "chrome/browser/ui/webui/options/options_ui.h" |
34 #include "chrome/browser/ui/webui/plugins_ui.h" | 34 #include "chrome/browser/ui/webui/plugins_ui.h" |
35 #include "chrome/browser/ui/webui/policy_ui.h" | 35 #include "chrome/browser/ui/webui/policy_ui.h" |
36 #include "chrome/browser/ui/webui/print_preview_ui.h" | 36 #include "chrome/browser/ui/webui/print_preview_ui.h" |
| 37 #include "chrome/browser/ui/webui/profiler_ui.h" |
37 #include "chrome/browser/ui/webui/quota_internals_ui.h" | 38 #include "chrome/browser/ui/webui/quota_internals_ui.h" |
38 #include "chrome/browser/ui/webui/sessions_ui.h" | 39 #include "chrome/browser/ui/webui/sessions_ui.h" |
39 #include "chrome/browser/ui/webui/sync_internals_ui.h" | 40 #include "chrome/browser/ui/webui/sync_internals_ui.h" |
40 #include "chrome/browser/ui/webui/test_chrome_web_ui_factory.h" | 41 #include "chrome/browser/ui/webui/test_chrome_web_ui_factory.h" |
41 #include "chrome/browser/ui/webui/tracing_ui.h" | 42 #include "chrome/browser/ui/webui/tracing_ui.h" |
42 #include "chrome/browser/ui/webui/tracking_ui.h" | |
43 #include "chrome/browser/ui/webui/workers_ui.h" | 43 #include "chrome/browser/ui/webui/workers_ui.h" |
44 #include "chrome/common/chrome_switches.h" | 44 #include "chrome/common/chrome_switches.h" |
45 #include "chrome/common/extensions/extension_constants.h" | 45 #include "chrome/common/extensions/extension_constants.h" |
46 #include "chrome/common/url_constants.h" | 46 #include "chrome/common/url_constants.h" |
47 #include "content/browser/tab_contents/tab_contents.h" | 47 #include "content/browser/tab_contents/tab_contents.h" |
48 #include "content/browser/webui/web_ui.h" | 48 #include "content/browser/webui/web_ui.h" |
49 #include "googleurl/src/gurl.h" | 49 #include "googleurl/src/gurl.h" |
50 | 50 |
51 #if defined(OS_CHROMEOS) | 51 #if defined(OS_CHROMEOS) |
52 #include "chrome/browser/ui/webui/chromeos/choose_mobile_network_ui.h" | 52 #include "chrome/browser/ui/webui/chromeos/choose_mobile_network_ui.h" |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 if (url.host() == chrome::kChromeUISessionsHost) | 204 if (url.host() == chrome::kChromeUISessionsHost) |
205 return &NewWebUI<SessionsUI>; | 205 return &NewWebUI<SessionsUI>; |
206 if (url.host() == chrome::kChromeUISettingsHost) | 206 if (url.host() == chrome::kChromeUISettingsHost) |
207 return &NewWebUI<OptionsUI>; | 207 return &NewWebUI<OptionsUI>; |
208 if (url.host() == chrome::kChromeUISyncInternalsHost) | 208 if (url.host() == chrome::kChromeUISyncInternalsHost) |
209 return &NewWebUI<SyncInternalsUI>; | 209 return &NewWebUI<SyncInternalsUI>; |
210 if (url.host() == chrome::kChromeUITaskManagerHost) | 210 if (url.host() == chrome::kChromeUITaskManagerHost) |
211 return &NewWebUI<TaskManagerUI>; | 211 return &NewWebUI<TaskManagerUI>; |
212 if (url.host() == chrome::kChromeUITracingHost) | 212 if (url.host() == chrome::kChromeUITracingHost) |
213 return &NewWebUI<TracingUI>; | 213 return &NewWebUI<TracingUI>; |
214 if (url.host() == chrome::kChromeUITrackingHost2) | 214 if (url.host() == chrome::kChromeUIProfilerHost) |
215 return &NewWebUI<TrackingUI>; | 215 return &NewWebUI<ProfilerUI>; |
216 if (url.host() == chrome::kChromeUIWorkersHost) | 216 if (url.host() == chrome::kChromeUIWorkersHost) |
217 return &NewWebUI<WorkersUI>; | 217 return &NewWebUI<WorkersUI>; |
218 | 218 |
219 #if defined(OS_CHROMEOS) | 219 #if defined(OS_CHROMEOS) |
220 if (url.host() == chrome::kChromeUIActiveDownloadsHost) | 220 if (url.host() == chrome::kChromeUIActiveDownloadsHost) |
221 return &NewWebUI<ActiveDownloadsUI>; | 221 return &NewWebUI<ActiveDownloadsUI>; |
222 if (url.host() == chrome::kChromeUIChooseMobileNetworkHost) | 222 if (url.host() == chrome::kChromeUIChooseMobileNetworkHost) |
223 return &NewWebUI<chromeos::ChooseMobileNetworkUI>; | 223 return &NewWebUI<chromeos::ChooseMobileNetworkUI>; |
224 if (url.host() == chrome::kChromeUIImageBurnerHost) | 224 if (url.host() == chrome::kChromeUIImageBurnerHost) |
225 return &NewWebUI<ImageBurnUI>; | 225 return &NewWebUI<ImageBurnUI>; |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 return FlashUI::GetFaviconResourceBytes(); | 412 return FlashUI::GetFaviconResourceBytes(); |
413 | 413 |
414 if (page_url.host() == chrome::kChromeUISettingsHost) | 414 if (page_url.host() == chrome::kChromeUISettingsHost) |
415 return OptionsUI::GetFaviconResourceBytes(); | 415 return OptionsUI::GetFaviconResourceBytes(); |
416 | 416 |
417 if (page_url.host() == chrome::kChromeUIPluginsHost) | 417 if (page_url.host() == chrome::kChromeUIPluginsHost) |
418 return PluginsUI::GetFaviconResourceBytes(); | 418 return PluginsUI::GetFaviconResourceBytes(); |
419 | 419 |
420 return NULL; | 420 return NULL; |
421 } | 421 } |
OLD | NEW |