| OLD | NEW |
| 1 // Copyright (c) 2009 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 "chrome/browser/chrome_thread.h" | 7 #include "chrome/browser/chrome_thread.h" |
| 8 #include "chrome/browser/dom_ui/bookmarks_ui.h" | 8 #include "chrome/browser/dom_ui/bookmarks_ui.h" |
| 9 #include "chrome/browser/dom_ui/downloads_ui.h" | 9 #include "chrome/browser/dom_ui/downloads_ui.h" |
| 10 #include "chrome/browser/dom_ui/devtools_ui.h" | 10 #include "chrome/browser/dom_ui/devtools_ui.h" |
| 11 #include "chrome/browser/dom_ui/history_ui.h" | 11 #include "chrome/browser/dom_ui/history_ui.h" |
| 12 #include "chrome/browser/dom_ui/filebrowse_ui.h" | 12 #include "chrome/browser/dom_ui/filebrowse_ui.h" |
| 13 #include "chrome/browser/dom_ui/html_dialog_ui.h" | 13 #include "chrome/browser/dom_ui/html_dialog_ui.h" |
| 14 #include "chrome/browser/dom_ui/mediaplayer_ui.h" | 14 #include "chrome/browser/dom_ui/mediaplayer_ui.h" |
| 15 #include "chrome/browser/dom_ui/net_internals_ui.h" | 15 #include "chrome/browser/dom_ui/net_internals_ui.h" |
| 16 #include "chrome/browser/dom_ui/new_tab_ui.h" | 16 #include "chrome/browser/dom_ui/new_tab_ui.h" |
| 17 #include "chrome/browser/dom_ui/plugins_ui.h" |
| 17 #include "chrome/browser/dom_ui/print_ui.h" | 18 #include "chrome/browser/dom_ui/print_ui.h" |
| 18 #include "chrome/browser/extensions/extension_dom_ui.h" | 19 #include "chrome/browser/extensions/extension_dom_ui.h" |
| 19 #include "chrome/browser/extensions/extensions_service.h" | 20 #include "chrome/browser/extensions/extensions_service.h" |
| 20 #include "chrome/browser/extensions/extensions_ui.h" | 21 #include "chrome/browser/extensions/extensions_ui.h" |
| 21 #include "chrome/browser/profile.h" | 22 #include "chrome/browser/profile.h" |
| 22 #include "chrome/browser/tab_contents/tab_contents.h" | 23 #include "chrome/browser/tab_contents/tab_contents.h" |
| 23 #include "chrome/common/url_constants.h" | 24 #include "chrome/common/url_constants.h" |
| 24 #include "googleurl/src/gurl.h" | 25 #include "googleurl/src/gurl.h" |
| 25 | 26 |
| 26 const DOMUITypeID DOMUIFactory::kNoDOMUI = NULL; | 27 const DOMUITypeID DOMUIFactory::kNoDOMUI = NULL; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 if (url.host() == chrome::kChromeUIDevToolsHost) | 93 if (url.host() == chrome::kChromeUIDevToolsHost) |
| 93 return &NewDOMUI<DevToolsUI>; | 94 return &NewDOMUI<DevToolsUI>; |
| 94 if (url.host() == chrome::kChromeUIDownloadsHost) | 95 if (url.host() == chrome::kChromeUIDownloadsHost) |
| 95 return &NewDOMUI<DownloadsUI>; | 96 return &NewDOMUI<DownloadsUI>; |
| 96 if (url.host() == chrome::kChromeUIExtensionsHost) | 97 if (url.host() == chrome::kChromeUIExtensionsHost) |
| 97 return &NewDOMUI<ExtensionsUI>; | 98 return &NewDOMUI<ExtensionsUI>; |
| 98 if (url.host() == chrome::kChromeUIHistoryHost) | 99 if (url.host() == chrome::kChromeUIHistoryHost) |
| 99 return &NewDOMUI<HistoryUI>; | 100 return &NewDOMUI<HistoryUI>; |
| 100 if (url.host() == chrome::kChromeUINetInternalsHost) | 101 if (url.host() == chrome::kChromeUINetInternalsHost) |
| 101 return &NewDOMUI<NetInternalsUI>; | 102 return &NewDOMUI<NetInternalsUI>; |
| 103 if (url.host() == chrome::kChromeUIPluginsHost) |
| 104 return &NewDOMUI<PluginsUI>; |
| 102 | 105 |
| 103 #if defined(OS_CHROMEOS) | 106 #if defined(OS_CHROMEOS) |
| 104 if (url.host() == chrome::kChromeUIFileBrowseHost) | 107 if (url.host() == chrome::kChromeUIFileBrowseHost) |
| 105 return &NewDOMUI<FileBrowseUI>; | 108 return &NewDOMUI<FileBrowseUI>; |
| 106 | 109 |
| 107 if (url.host() == chrome::kChromeUIMediaplayerHost) | 110 if (url.host() == chrome::kChromeUIMediaplayerHost) |
| 108 return &NewDOMUI<MediaplayerUI>; | 111 return &NewDOMUI<MediaplayerUI>; |
| 109 #endif | 112 #endif |
| 110 | 113 |
| 111 return NULL; | 114 return NULL; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 | 156 |
| 154 if (page_url.host() == chrome::kChromeUIDownloadsHost) | 157 if (page_url.host() == chrome::kChromeUIDownloadsHost) |
| 155 return DownloadsUI::GetFaviconResourceBytes(); | 158 return DownloadsUI::GetFaviconResourceBytes(); |
| 156 | 159 |
| 157 if (page_url.host() == chrome::kChromeUIExtensionsHost) | 160 if (page_url.host() == chrome::kChromeUIExtensionsHost) |
| 158 return ExtensionsUI::GetFaviconResourceBytes(); | 161 return ExtensionsUI::GetFaviconResourceBytes(); |
| 159 | 162 |
| 160 if (page_url.host() == chrome::kChromeUIHistoryHost) | 163 if (page_url.host() == chrome::kChromeUIHistoryHost) |
| 161 return HistoryUI::GetFaviconResourceBytes(); | 164 return HistoryUI::GetFaviconResourceBytes(); |
| 162 | 165 |
| 166 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 167 return PluginsUI::GetFaviconResourceBytes(); |
| 168 |
| 163 return NULL; | 169 return NULL; |
| 164 } | 170 } |
| OLD | NEW |