| 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 #include "chrome/browser/dom_ui/flags_ui.h" | 19 #include "chrome/browser/dom_ui/flags_ui.h" |
| 19 #include "chrome/browser/dom_ui/net_internals_ui.h" | 20 #include "chrome/browser/dom_ui/net_internals_ui.h" |
| 20 #include "chrome/browser/dom_ui/new_tab_ui.h" | 21 #include "chrome/browser/dom_ui/new_tab_ui.h" |
| 21 #include "chrome/browser/dom_ui/plugins_ui.h" | 22 #include "chrome/browser/dom_ui/plugins_ui.h" |
| 22 #include "chrome/browser/dom_ui/print_preview_ui.h" | 23 #include "chrome/browser/dom_ui/print_preview_ui.h" |
| 23 #include "chrome/browser/dom_ui/remoting_ui.h" | 24 #include "chrome/browser/dom_ui/remoting_ui.h" |
| 24 #include "chrome/browser/dom_ui/options/options_ui.h" | 25 #include "chrome/browser/dom_ui/options/options_ui.h" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 if (url.host() == chrome::kChromeUIHistory2Host) | 154 if (url.host() == chrome::kChromeUIHistory2Host) |
| 154 return &NewDOMUI<HistoryUI2>; | 155 return &NewDOMUI<HistoryUI2>; |
| 155 if (url.host() == chrome::kChromeUIFlagsHost) | 156 if (url.host() == chrome::kChromeUIFlagsHost) |
| 156 return &NewDOMUI<FlagsUI>; | 157 return &NewDOMUI<FlagsUI>; |
| 157 #if defined(TOUCH_UI) | 158 #if defined(TOUCH_UI) |
| 158 if (url.host() == chrome::kChromeUIKeyboardHost) | 159 if (url.host() == chrome::kChromeUIKeyboardHost) |
| 159 return &NewDOMUI<KeyboardUI>; | 160 return &NewDOMUI<KeyboardUI>; |
| 160 if (url.host() == chrome::kChromeUILoginHost) | 161 if (url.host() == chrome::kChromeUILoginHost) |
| 161 return &NewDOMUI<chromeos::LoginUI>; | 162 return &NewDOMUI<chromeos::LoginUI>; |
| 162 #endif | 163 #endif |
| 164 if (url.host() == chrome::kChromeUIGpuInternalsHost) |
| 165 return &NewDOMUI<GpuUI>; |
| 163 if (url.host() == chrome::kChromeUINetInternalsHost) | 166 if (url.host() == chrome::kChromeUINetInternalsHost) |
| 164 return &NewDOMUI<NetInternalsUI>; | 167 return &NewDOMUI<NetInternalsUI>; |
| 165 if (url.host() == chrome::kChromeUIPluginsHost) | 168 if (url.host() == chrome::kChromeUIPluginsHost) |
| 166 return &NewDOMUI<PluginsUI>; | 169 return &NewDOMUI<PluginsUI>; |
| 167 #if defined(ENABLE_REMOTING) | 170 #if defined(ENABLE_REMOTING) |
| 168 if (url.host() == chrome::kChromeUIRemotingHost) { | 171 if (url.host() == chrome::kChromeUIRemotingHost) { |
| 169 if (CommandLine::ForCurrentProcess()->HasSwitch( | 172 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 170 switches::kEnableRemoting)) { | 173 switches::kEnableRemoting)) { |
| 171 return &NewDOMUI<RemotingUI>; | 174 return &NewDOMUI<RemotingUI>; |
| 172 } | 175 } |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 if (page_url.host() == chrome::kChromeUIPluginsHost) | 327 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 325 return PluginsUI::GetFaviconResourceBytes(); | 328 return PluginsUI::GetFaviconResourceBytes(); |
| 326 | 329 |
| 327 #if defined(ENABLE_REMOTING) | 330 #if defined(ENABLE_REMOTING) |
| 328 if (page_url.host() == chrome::kChromeUIRemotingHost) | 331 if (page_url.host() == chrome::kChromeUIRemotingHost) |
| 329 return RemotingUI::GetFaviconResourceBytes(); | 332 return RemotingUI::GetFaviconResourceBytes(); |
| 330 #endif | 333 #endif |
| 331 | 334 |
| 332 return NULL; | 335 return NULL; |
| 333 } | 336 } |
| OLD | NEW |