| 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/downloads_ui.h" | 13 #include "chrome/browser/dom_ui/downloads_ui.h" |
| 13 #include "chrome/browser/dom_ui/devtools_ui.h" | 14 #include "chrome/browser/dom_ui/devtools_ui.h" |
| 14 #include "chrome/browser/dom_ui/history_ui.h" | 15 #include "chrome/browser/dom_ui/history_ui.h" |
| 15 #include "chrome/browser/dom_ui/history2_ui.h" | 16 #include "chrome/browser/dom_ui/history2_ui.h" |
| 16 #include "chrome/browser/dom_ui/html_dialog_ui.h" | 17 #include "chrome/browser/dom_ui/html_dialog_ui.h" |
| 17 #if defined(TOUCH_UI) | 18 #if defined(TOUCH_UI) |
| 18 #include "chrome/browser/dom_ui/keyboard_ui.h" | 19 #include "chrome/browser/dom_ui/keyboard_ui.h" |
| 19 #endif | 20 #endif |
| 20 #include "chrome/browser/dom_ui/flags_ui.h" | 21 #include "chrome/browser/dom_ui/flags_ui.h" |
| 21 #include "chrome/browser/dom_ui/net_internals_ui.h" | 22 #include "chrome/browser/dom_ui/net_internals_ui.h" |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 } | 185 } |
| 185 } | 186 } |
| 186 if (url.host() == chrome::kChromeUIPrintHost) { | 187 if (url.host() == chrome::kChromeUIPrintHost) { |
| 187 if (CommandLine::ForCurrentProcess()->HasSwitch( | 188 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 188 switches::kEnablePrintPreview)) { | 189 switches::kEnablePrintPreview)) { |
| 189 return &NewDOMUI<PrintPreviewUI>; | 190 return &NewDOMUI<PrintPreviewUI>; |
| 190 } | 191 } |
| 191 } | 192 } |
| 192 #endif | 193 #endif |
| 193 | 194 |
| 195 if (url.spec() == chrome::kChromeUIConstrainedHTMLTestURL) |
| 196 return &NewDOMUI<ConstrainedHtmlUI>; |
| 197 |
| 194 return NULL; | 198 return NULL; |
| 195 } | 199 } |
| 196 | 200 |
| 197 // static | 201 // static |
| 198 DOMUITypeID DOMUIFactory::GetDOMUIType(Profile* profile, const GURL& url) { | 202 DOMUITypeID DOMUIFactory::GetDOMUIType(Profile* profile, const GURL& url) { |
| 199 DOMUIFactoryFunction function = GetDOMUIFactoryFunction(profile, url); | 203 DOMUIFactoryFunction function = GetDOMUIFactoryFunction(profile, url); |
| 200 return function ? reinterpret_cast<DOMUITypeID>(function) : kNoDOMUI; | 204 return function ? reinterpret_cast<DOMUITypeID>(function) : kNoDOMUI; |
| 201 } | 205 } |
| 202 | 206 |
| 203 // static | 207 // static |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 if (page_url.host() == chrome::kChromeUIPluginsHost) | 283 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 280 return PluginsUI::GetFaviconResourceBytes(); | 284 return PluginsUI::GetFaviconResourceBytes(); |
| 281 | 285 |
| 282 #if defined(ENABLE_REMOTING) | 286 #if defined(ENABLE_REMOTING) |
| 283 if (page_url.host() == chrome::kChromeUIRemotingHost) | 287 if (page_url.host() == chrome::kChromeUIRemotingHost) |
| 284 return RemotingUI::GetFaviconResourceBytes(); | 288 return RemotingUI::GetFaviconResourceBytes(); |
| 285 #endif | 289 #endif |
| 286 | 290 |
| 287 return NULL; | 291 return NULL; |
| 288 } | 292 } |
| OLD | NEW |