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" |
11 #include "chrome/browser/extensions/extensions_ui.h" | 11 #include "chrome/browser/extensions/extensions_ui.h" |
12 #include "chrome/browser/history/history_types.h" | 12 #include "chrome/browser/history/history_types.h" |
13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/browser/ui/webui/bookmarks_ui.h" | 14 #include "chrome/browser/ui/webui/bookmarks_ui.h" |
15 #include "chrome/browser/ui/webui/bug_report_ui.h" | 15 #include "chrome/browser/ui/webui/bug_report_ui.h" |
16 #include "chrome/browser/ui/webui/constrained_html_ui.h" | 16 #include "chrome/browser/ui/webui/constrained_html_ui.h" |
17 #include "chrome/browser/ui/webui/crashes_ui.h" | 17 #include "chrome/browser/ui/webui/crashes_ui.h" |
18 #include "chrome/browser/ui/webui/devtools_ui.h" | 18 #include "chrome/browser/ui/webui/devtools_ui.h" |
19 #include "chrome/browser/ui/webui/downloads_ui.h" | 19 #include "chrome/browser/ui/webui/downloads_ui.h" |
20 #include "chrome/browser/ui/webui/task_manager_ui.h" | 20 #include "chrome/browser/ui/webui/task_manager_ui.h" |
21 #include "chrome/browser/ui/webui/flags_ui.h" | 21 #include "chrome/browser/ui/webui/flags_ui.h" |
22 #include "chrome/browser/ui/webui/flash_ui.h" | 22 #include "chrome/browser/ui/webui/flash_ui.h" |
23 #include "chrome/browser/ui/webui/gpu_internals_ui.h" | 23 #include "chrome/browser/ui/webui/gpu_internals_ui.h" |
24 #include "chrome/browser/ui/webui/history2_ui.h" | 24 #include "chrome/browser/ui/webui/history2_ui.h" |
25 #include "chrome/browser/ui/webui/history_ui.h" | 25 #include "chrome/browser/ui/webui/history_ui.h" |
26 #include "chrome/browser/ui/webui/html_dialog_ui.h" | 26 #include "chrome/browser/ui/webui/html_dialog_ui.h" |
| 27 #include "chrome/browser/ui/webui/media_internals_ui.h" |
27 #include "chrome/browser/ui/webui/net_internals_ui.h" | 28 #include "chrome/browser/ui/webui/net_internals_ui.h" |
28 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" | 29 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" |
29 #include "chrome/browser/ui/webui/options/options_ui.h" | 30 #include "chrome/browser/ui/webui/options/options_ui.h" |
30 #include "chrome/browser/ui/webui/plugins_ui.h" | 31 #include "chrome/browser/ui/webui/plugins_ui.h" |
31 #include "chrome/browser/ui/webui/print_preview_ui.h" | 32 #include "chrome/browser/ui/webui/print_preview_ui.h" |
32 #include "chrome/browser/ui/webui/sessions_ui.h" | 33 #include "chrome/browser/ui/webui/sessions_ui.h" |
33 #include "chrome/browser/ui/webui/sync_internals_ui.h" | 34 #include "chrome/browser/ui/webui/sync_internals_ui.h" |
34 #include "chrome/browser/ui/webui/test_chrome_web_ui_factory.h" | 35 #include "chrome/browser/ui/webui/test_chrome_web_ui_factory.h" |
35 #include "chrome/browser/ui/webui/textfields_ui.h" | 36 #include "chrome/browser/ui/webui/textfields_ui.h" |
36 #include "chrome/common/chrome_switches.h" | 37 #include "chrome/common/chrome_switches.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 if (url.host() == chrome::kChromeUIFlagsHost) | 160 if (url.host() == chrome::kChromeUIFlagsHost) |
160 return &NewWebUI<FlagsUI>; | 161 return &NewWebUI<FlagsUI>; |
161 if (url.host() == chrome::kChromeUIFlashHost) | 162 if (url.host() == chrome::kChromeUIFlashHost) |
162 return &NewWebUI<FlashUI>; | 163 return &NewWebUI<FlashUI>; |
163 #if defined(TOUCH_UI) | 164 #if defined(TOUCH_UI) |
164 if (url.host() == chrome::kChromeUIKeyboardHost) | 165 if (url.host() == chrome::kChromeUIKeyboardHost) |
165 return &NewWebUI<KeyboardUI>; | 166 return &NewWebUI<KeyboardUI>; |
166 #endif | 167 #endif |
167 if (url.host() == chrome::kChromeUIGpuInternalsHost) | 168 if (url.host() == chrome::kChromeUIGpuInternalsHost) |
168 return &NewWebUI<GpuInternalsUI>; | 169 return &NewWebUI<GpuInternalsUI>; |
| 170 if (url.host() == chrome::kChromeUIMediaInternalsHost) |
| 171 return &NewWebUI<MediaInternalsUI>; |
169 if (url.host() == chrome::kChromeUINetInternalsHost) | 172 if (url.host() == chrome::kChromeUINetInternalsHost) |
170 return &NewWebUI<NetInternalsUI>; | 173 return &NewWebUI<NetInternalsUI>; |
171 if (url.host() == chrome::kChromeUIPluginsHost) | 174 if (url.host() == chrome::kChromeUIPluginsHost) |
172 return &NewWebUI<PluginsUI>; | 175 return &NewWebUI<PluginsUI>; |
173 if (url.host() == chrome::kChromeUISessionsHost) | 176 if (url.host() == chrome::kChromeUISessionsHost) |
174 return &NewWebUI<SessionsUI>; | 177 return &NewWebUI<SessionsUI>; |
175 if (url.host() == chrome::kChromeUISyncInternalsHost) | 178 if (url.host() == chrome::kChromeUISyncInternalsHost) |
176 return &NewWebUI<SyncInternalsUI>; | 179 return &NewWebUI<SyncInternalsUI>; |
177 if (url.host() == chrome::kChromeUISettingsHost) | 180 if (url.host() == chrome::kChromeUISettingsHost) |
178 return &NewWebUI<OptionsUI>; | 181 return &NewWebUI<OptionsUI>; |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 return FlashUI::GetFaviconResourceBytes(); | 362 return FlashUI::GetFaviconResourceBytes(); |
360 | 363 |
361 if (page_url.host() == chrome::kChromeUISettingsHost) | 364 if (page_url.host() == chrome::kChromeUISettingsHost) |
362 return OptionsUI::GetFaviconResourceBytes(); | 365 return OptionsUI::GetFaviconResourceBytes(); |
363 | 366 |
364 if (page_url.host() == chrome::kChromeUIPluginsHost) | 367 if (page_url.host() == chrome::kChromeUIPluginsHost) |
365 return PluginsUI::GetFaviconResourceBytes(); | 368 return PluginsUI::GetFaviconResourceBytes(); |
366 | 369 |
367 return NULL; | 370 return NULL; |
368 } | 371 } |
OLD | NEW |