| 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" | |
| 16 #include "chrome/browser/ui/webui/about_ui.h" | 15 #include "chrome/browser/ui/webui/about_ui.h" |
| 17 #include "chrome/browser/ui/webui/bookmarks_ui.h" | 16 #include "chrome/browser/ui/webui/bookmarks_ui.h" |
| 18 #include "chrome/browser/ui/webui/constrained_html_ui.h" | 17 #include "chrome/browser/ui/webui/constrained_html_ui.h" |
| 19 #include "chrome/browser/ui/webui/crashes_ui.h" | 18 #include "chrome/browser/ui/webui/crashes_ui.h" |
| 20 #include "chrome/browser/ui/webui/devtools_ui.h" | 19 #include "chrome/browser/ui/webui/devtools_ui.h" |
| 21 #include "chrome/browser/ui/webui/downloads_ui.h" | 20 #include "chrome/browser/ui/webui/downloads_ui.h" |
| 22 #include "chrome/browser/ui/webui/edit_search_engine_dialog_ui_webui.h" | 21 #include "chrome/browser/ui/webui/edit_search_engine_dialog_ui_webui.h" |
| 23 #include "chrome/browser/ui/webui/extensions/extensions_ui.h" | 22 #include "chrome/browser/ui/webui/extensions/extensions_ui.h" |
| 24 #include "chrome/browser/ui/webui/feedback_ui.h" | 23 #include "chrome/browser/ui/webui/feedback_ui.h" |
| 25 #include "chrome/browser/ui/webui/task_manager_ui.h" | 24 #include "chrome/browser/ui/webui/task_manager_ui.h" |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 if (url.host() == chrome::kChromeUIOobeHost) | 253 if (url.host() == chrome::kChromeUIOobeHost) |
| 255 return &NewWebUI<chromeos::OobeUI>; | 254 return &NewWebUI<chromeos::OobeUI>; |
| 256 if (url.host() == chrome::kChromeUIProxySettingsHost) | 255 if (url.host() == chrome::kChromeUIProxySettingsHost) |
| 257 return &NewWebUI<chromeos::ProxySettingsUI>; | 256 return &NewWebUI<chromeos::ProxySettingsUI>; |
| 258 if (url.host() == chrome::kChromeUIRegisterPageHost) | 257 if (url.host() == chrome::kChromeUIRegisterPageHost) |
| 259 return &NewWebUI<RegisterPageUI>; | 258 return &NewWebUI<RegisterPageUI>; |
| 260 if (url.host() == chrome::kChromeUISimUnlockHost) | 259 if (url.host() == chrome::kChromeUISimUnlockHost) |
| 261 return &NewWebUI<chromeos::SimUnlockUI>; | 260 return &NewWebUI<chromeos::SimUnlockUI>; |
| 262 if (url.host() == chrome::kChromeUISystemInfoHost) | 261 if (url.host() == chrome::kChromeUISystemInfoHost) |
| 263 return &NewWebUI<SystemInfoUI>; | 262 return &NewWebUI<SystemInfoUI>; |
| 264 if (url.host() == chrome::kChromeUIAboutPageFrameHost) | |
| 265 return &NewWebUI<AboutPageUI>; | |
| 266 #endif // defined(OS_CHROMEOS) | 263 #endif // defined(OS_CHROMEOS) |
| 267 | 264 |
| 268 #if (defined(OS_LINUX) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA) | 265 #if (defined(OS_LINUX) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA) |
| 269 if (url.host() == chrome::kChromeUICollectedCookiesHost || | 266 if (url.host() == chrome::kChromeUICollectedCookiesHost || |
| 270 url.host() == chrome::kChromeUIHttpAuthHost || | 267 url.host() == chrome::kChromeUIHttpAuthHost || |
| 271 url.host() == chrome::kChromeUITabModalConfirmDialogHost) { | 268 url.host() == chrome::kChromeUITabModalConfirmDialogHost) { |
| 272 return &NewWebUI<ConstrainedHtmlUI>; | 269 return &NewWebUI<ConstrainedHtmlUI>; |
| 273 } | 270 } |
| 274 #endif | 271 #endif |
| 275 | 272 |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 return OptionsUI::GetFaviconResourceBytes(); | 477 return OptionsUI::GetFaviconResourceBytes(); |
| 481 | 478 |
| 482 if (page_url.host() == chrome::kChromeUISettingsFrameHost) | 479 if (page_url.host() == chrome::kChromeUISettingsFrameHost) |
| 483 return options2::OptionsUI::GetFaviconResourceBytes(); | 480 return options2::OptionsUI::GetFaviconResourceBytes(); |
| 484 | 481 |
| 485 if (page_url.host() == chrome::kChromeUIPluginsHost) | 482 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 486 return PluginsUI::GetFaviconResourceBytes(); | 483 return PluginsUI::GetFaviconResourceBytes(); |
| 487 | 484 |
| 488 return NULL; | 485 return NULL; |
| 489 } | 486 } |
| OLD | NEW |