OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/dom_ui/dom_ui_factory.h" | 5 #include "chrome/browser/dom_ui/dom_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/browser_thread.h" | 9 #include "chrome/browser/browser_thread.h" |
10 #include "chrome/browser/dom_ui/bookmarks_ui.h" | 10 #include "chrome/browser/dom_ui/bookmarks_ui.h" |
11 #include "chrome/browser/dom_ui/bug_report_ui.h" | 11 #include "chrome/browser/dom_ui/bug_report_ui.h" |
12 #include "chrome/browser/dom_ui/constrained_html_ui.h" | 12 #include "chrome/browser/dom_ui/constrained_html_ui.h" |
13 #include "chrome/browser/dom_ui/downloads_ui.h" | 13 #include "chrome/browser/dom_ui/downloads_ui.h" |
14 #include "chrome/browser/dom_ui/devtools_ui.h" | 14 #include "chrome/browser/dom_ui/devtools_ui.h" |
| 15 #include "chrome/browser/dom_ui/gpu_internals_ui.h" |
15 #include "chrome/browser/dom_ui/history_ui.h" | 16 #include "chrome/browser/dom_ui/history_ui.h" |
16 #include "chrome/browser/dom_ui/history2_ui.h" | 17 #include "chrome/browser/dom_ui/history2_ui.h" |
17 #include "chrome/browser/dom_ui/html_dialog_ui.h" | 18 #include "chrome/browser/dom_ui/html_dialog_ui.h" |
18 #if defined(TOUCH_UI) | 19 #if defined(TOUCH_UI) |
19 #include "chrome/browser/dom_ui/keyboard_ui.h" | 20 #include "chrome/browser/dom_ui/keyboard_ui.h" |
20 #endif | 21 #endif |
21 #include "chrome/browser/dom_ui/flags_ui.h" | 22 #include "chrome/browser/dom_ui/flags_ui.h" |
22 #include "chrome/browser/dom_ui/net_internals_ui.h" | 23 #include "chrome/browser/dom_ui/net_internals_ui.h" |
23 #include "chrome/browser/dom_ui/new_tab_ui.h" | 24 #include "chrome/browser/dom_ui/new_tab_ui.h" |
24 #include "chrome/browser/dom_ui/plugins_ui.h" | 25 #include "chrome/browser/dom_ui/plugins_ui.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 if (url.host() == chrome::kChromeUIHistoryHost) | 150 if (url.host() == chrome::kChromeUIHistoryHost) |
150 return &NewDOMUI<HistoryUI>; | 151 return &NewDOMUI<HistoryUI>; |
151 if (url.host() == chrome::kChromeUIHistory2Host) | 152 if (url.host() == chrome::kChromeUIHistory2Host) |
152 return &NewDOMUI<HistoryUI2>; | 153 return &NewDOMUI<HistoryUI2>; |
153 if (url.host() == chrome::kChromeUIFlagsHost) | 154 if (url.host() == chrome::kChromeUIFlagsHost) |
154 return &NewDOMUI<FlagsUI>; | 155 return &NewDOMUI<FlagsUI>; |
155 #if defined(TOUCH_UI) | 156 #if defined(TOUCH_UI) |
156 if (url.host() == chrome::kChromeUIKeyboardHost) | 157 if (url.host() == chrome::kChromeUIKeyboardHost) |
157 return &NewDOMUI<KeyboardUI>; | 158 return &NewDOMUI<KeyboardUI>; |
158 #endif | 159 #endif |
| 160 if (url.host() == chrome::kChromeUIGpuInternalsHost) |
| 161 return &NewDOMUI<GpuUI>; |
159 if (url.host() == chrome::kChromeUINetInternalsHost) | 162 if (url.host() == chrome::kChromeUINetInternalsHost) |
160 return &NewDOMUI<NetInternalsUI>; | 163 return &NewDOMUI<NetInternalsUI>; |
161 if (url.host() == chrome::kChromeUIPluginsHost) | 164 if (url.host() == chrome::kChromeUIPluginsHost) |
162 return &NewDOMUI<PluginsUI>; | 165 return &NewDOMUI<PluginsUI>; |
163 #if defined(ENABLE_REMOTING) | 166 #if defined(ENABLE_REMOTING) |
164 if (url.host() == chrome::kChromeUIRemotingHost) { | 167 if (url.host() == chrome::kChromeUIRemotingHost) { |
165 if (CommandLine::ForCurrentProcess()->HasSwitch( | 168 if (CommandLine::ForCurrentProcess()->HasSwitch( |
166 switches::kEnableRemoting)) { | 169 switches::kEnableRemoting)) { |
167 return &NewDOMUI<RemotingUI>; | 170 return &NewDOMUI<RemotingUI>; |
168 } | 171 } |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 if (page_url.host() == chrome::kChromeUIPluginsHost) | 323 if (page_url.host() == chrome::kChromeUIPluginsHost) |
321 return PluginsUI::GetFaviconResourceBytes(); | 324 return PluginsUI::GetFaviconResourceBytes(); |
322 | 325 |
323 #if defined(ENABLE_REMOTING) | 326 #if defined(ENABLE_REMOTING) |
324 if (page_url.host() == chrome::kChromeUIRemotingHost) | 327 if (page_url.host() == chrome::kChromeUIRemotingHost) |
325 return RemotingUI::GetFaviconResourceBytes(); | 328 return RemotingUI::GetFaviconResourceBytes(); |
326 #endif | 329 #endif |
327 | 330 |
328 return NULL; | 331 return NULL; |
329 } | 332 } |
OLD | NEW |