| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/history/history_types.h" | 11 #include "chrome/browser/history/history_types.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/browser/profiles/profile_manager.h" | 13 #include "chrome/browser/profiles/profile_manager.h" |
| 14 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 14 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 15 #include "chrome/browser/ui/webui/about_page/about_page_ui.h" |
| 15 #include "chrome/browser/ui/webui/about_ui.h" | 16 #include "chrome/browser/ui/webui/about_ui.h" |
| 16 #include "chrome/browser/ui/webui/bookmarks_ui.h" | 17 #include "chrome/browser/ui/webui/bookmarks_ui.h" |
| 17 #include "chrome/browser/ui/webui/constrained_html_ui.h" | 18 #include "chrome/browser/ui/webui/constrained_html_ui.h" |
| 18 #include "chrome/browser/ui/webui/crashes_ui.h" | 19 #include "chrome/browser/ui/webui/crashes_ui.h" |
| 19 #include "chrome/browser/ui/webui/devtools_ui.h" | 20 #include "chrome/browser/ui/webui/devtools_ui.h" |
| 20 #include "chrome/browser/ui/webui/downloads_ui.h" | 21 #include "chrome/browser/ui/webui/downloads_ui.h" |
| 21 #include "chrome/browser/ui/webui/edit_search_engine_dialog_ui_webui.h" | 22 #include "chrome/browser/ui/webui/edit_search_engine_dialog_ui_webui.h" |
| 22 #include "chrome/browser/ui/webui/extensions/extensions_ui.h" | 23 #include "chrome/browser/ui/webui/extensions/extensions_ui.h" |
| 23 #include "chrome/browser/ui/webui/feedback_ui.h" | 24 #include "chrome/browser/ui/webui/feedback_ui.h" |
| 24 #include "chrome/browser/ui/webui/task_manager_ui.h" | 25 #include "chrome/browser/ui/webui/task_manager_ui.h" |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 if (url.host() == chrome::kChromeUIOobeHost) | 255 if (url.host() == chrome::kChromeUIOobeHost) |
| 255 return &NewWebUI<chromeos::OobeUI>; | 256 return &NewWebUI<chromeos::OobeUI>; |
| 256 if (url.host() == chrome::kChromeUIProxySettingsHost) | 257 if (url.host() == chrome::kChromeUIProxySettingsHost) |
| 257 return &NewWebUI<chromeos::ProxySettingsUI>; | 258 return &NewWebUI<chromeos::ProxySettingsUI>; |
| 258 if (url.host() == chrome::kChromeUIRegisterPageHost) | 259 if (url.host() == chrome::kChromeUIRegisterPageHost) |
| 259 return &NewWebUI<RegisterPageUI>; | 260 return &NewWebUI<RegisterPageUI>; |
| 260 if (url.host() == chrome::kChromeUISimUnlockHost) | 261 if (url.host() == chrome::kChromeUISimUnlockHost) |
| 261 return &NewWebUI<chromeos::SimUnlockUI>; | 262 return &NewWebUI<chromeos::SimUnlockUI>; |
| 262 if (url.host() == chrome::kChromeUISystemInfoHost) | 263 if (url.host() == chrome::kChromeUISystemInfoHost) |
| 263 return &NewWebUI<SystemInfoUI>; | 264 return &NewWebUI<SystemInfoUI>; |
| 265 if (url.host() == chrome::kChromeUIAboutPageFrameHost) |
| 266 return &NewWebUI<AboutPageUI>; |
| 264 #endif // defined(OS_CHROMEOS) | 267 #endif // defined(OS_CHROMEOS) |
| 265 | 268 |
| 266 #if (defined(OS_LINUX) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA) | 269 #if (defined(OS_LINUX) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA) |
| 267 if (url.host() == chrome::kChromeUICollectedCookiesHost || | 270 if (url.host() == chrome::kChromeUICollectedCookiesHost || |
| 268 url.host() == chrome::kChromeUIHttpAuthHost || | 271 url.host() == chrome::kChromeUIHttpAuthHost || |
| 269 url.host() == chrome::kChromeUITabModalConfirmDialogHost) { | 272 url.host() == chrome::kChromeUITabModalConfirmDialogHost) { |
| 270 return &NewWebUI<ConstrainedHtmlUI>; | 273 return &NewWebUI<ConstrainedHtmlUI>; |
| 271 } | 274 } |
| 272 #endif | 275 #endif |
| 273 | 276 |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 return OptionsUI::GetFaviconResourceBytes(); | 478 return OptionsUI::GetFaviconResourceBytes(); |
| 476 | 479 |
| 477 if (page_url.host() == chrome::kChromeUISettingsFrameHost) | 480 if (page_url.host() == chrome::kChromeUISettingsFrameHost) |
| 478 return options2::OptionsUI::GetFaviconResourceBytes(); | 481 return options2::OptionsUI::GetFaviconResourceBytes(); |
| 479 | 482 |
| 480 if (page_url.host() == chrome::kChromeUIPluginsHost) | 483 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 481 return PluginsUI::GetFaviconResourceBytes(); | 484 return PluginsUI::GetFaviconResourceBytes(); |
| 482 | 485 |
| 483 return NULL; | 486 return NULL; |
| 484 } | 487 } |
| OLD | NEW |