Chromium Code Reviews| 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_controller_factory.h" | 5 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 44 #include "chrome/browser/ui/webui/profiler_ui.h" | 44 #include "chrome/browser/ui/webui/profiler_ui.h" |
| 45 #include "chrome/browser/ui/webui/settings/md_settings_ui.h" | 45 #include "chrome/browser/ui/webui/settings/md_settings_ui.h" |
| 46 #include "chrome/browser/ui/webui/signin/inline_login_ui.h" | 46 #include "chrome/browser/ui/webui/signin/inline_login_ui.h" |
| 47 #include "chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.h" | 47 #include "chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.h" |
| 48 #include "chrome/browser/ui/webui/signin/user_manager_ui.h" | 48 #include "chrome/browser/ui/webui/signin/user_manager_ui.h" |
| 49 #include "chrome/browser/ui/webui/signin_internals_ui.h" | 49 #include "chrome/browser/ui/webui/signin_internals_ui.h" |
| 50 #include "chrome/browser/ui/webui/sync_internals_ui.h" | 50 #include "chrome/browser/ui/webui/sync_internals_ui.h" |
| 51 #include "chrome/browser/ui/webui/translate_internals/translate_internals_ui.h" | 51 #include "chrome/browser/ui/webui/translate_internals/translate_internals_ui.h" |
| 52 #include "chrome/browser/ui/webui/user_actions/user_actions_ui.h" | 52 #include "chrome/browser/ui/webui/user_actions/user_actions_ui.h" |
| 53 #include "chrome/browser/ui/webui/version_ui.h" | 53 #include "chrome/browser/ui/webui/version_ui.h" |
| 54 #include "chrome/browser/ui/webui/web_component_test_ui.h" | |
| 54 #include "chrome/common/chrome_switches.h" | 55 #include "chrome/common/chrome_switches.h" |
| 55 #include "chrome/common/pref_names.h" | 56 #include "chrome/common/pref_names.h" |
| 56 #include "chrome/common/url_constants.h" | 57 #include "chrome/common/url_constants.h" |
| 57 #include "components/dom_distiller/core/dom_distiller_constants.h" | 58 #include "components/dom_distiller/core/dom_distiller_constants.h" |
| 58 #include "components/dom_distiller/core/dom_distiller_service.h" | 59 #include "components/dom_distiller/core/dom_distiller_service.h" |
| 59 #include "components/dom_distiller/core/url_constants.h" | 60 #include "components/dom_distiller/core/url_constants.h" |
| 60 #include "components/dom_distiller/webui/dom_distiller_ui.h" | 61 #include "components/dom_distiller/webui/dom_distiller_ui.h" |
| 61 #include "components/favicon/core/favicon_service.h" | 62 #include "components/favicon/core/favicon_service.h" |
| 62 #include "components/favicon_base/favicon_util.h" | 63 #include "components/favicon_base/favicon_util.h" |
| 63 #include "components/favicon_base/select_favicon_frames.h" | 64 #include "components/favicon_base/select_favicon_frames.h" |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 349 if (url.host() == chrome::kChromeUISyncInternalsHost) | 350 if (url.host() == chrome::kChromeUISyncInternalsHost) |
| 350 return &NewWebUI<SyncInternalsUI>; | 351 return &NewWebUI<SyncInternalsUI>; |
| 351 if (url.host() == chrome::kChromeUISyncResourcesHost) | 352 if (url.host() == chrome::kChromeUISyncResourcesHost) |
| 352 return &NewWebUI<WebDialogUI>; | 353 return &NewWebUI<WebDialogUI>; |
| 353 if (url.host() == chrome::kChromeUITranslateInternalsHost) | 354 if (url.host() == chrome::kChromeUITranslateInternalsHost) |
| 354 return &NewWebUI<TranslateInternalsUI>; | 355 return &NewWebUI<TranslateInternalsUI>; |
| 355 if (url.host() == chrome::kChromeUIUserActionsHost) | 356 if (url.host() == chrome::kChromeUIUserActionsHost) |
| 356 return &NewWebUI<UserActionsUI>; | 357 return &NewWebUI<UserActionsUI>; |
| 357 if (url.host() == chrome::kChromeUIVersionHost) | 358 if (url.host() == chrome::kChromeUIVersionHost) |
| 358 return &NewWebUI<VersionUI>; | 359 return &NewWebUI<VersionUI>; |
| 360 if (url.host() == chrome::kChromeUIWebComponentTestHost) | |
|
James Hawkins
2015/05/14 15:16:09
How can we mitigate this being accessible outside
michaelpg
2015/05/14 19:06:31
We could put it behind a flag, but I don't think t
| |
| 361 return &NewWebUI<WebComponentTestUI>; | |
| 359 | 362 |
| 360 /**************************************************************************** | 363 /**************************************************************************** |
| 361 * OS Specific #defines | 364 * OS Specific #defines |
| 362 ***************************************************************************/ | 365 ***************************************************************************/ |
| 363 #if !defined(OS_ANDROID) | 366 #if !defined(OS_ANDROID) |
| 364 #if !defined(OS_CHROMEOS) | 367 #if !defined(OS_CHROMEOS) |
| 365 // AppLauncherPage is not needed on Android or ChromeOS. | 368 // AppLauncherPage is not needed on Android or ChromeOS. |
| 366 if (url.host() == chrome::kChromeUIAppLauncherPageHost && | 369 if (url.host() == chrome::kChromeUIAppLauncherPageHost && |
| 367 profile && extensions::ExtensionSystem::Get(profile)-> | 370 profile && extensions::ExtensionSystem::Get(profile)-> |
| 368 extension_service()) { | 371 extension_service()) { |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 756 #endif | 759 #endif |
| 757 | 760 |
| 758 // Android doesn't use the plugins pages. | 761 // Android doesn't use the plugins pages. |
| 759 if (page_url.host() == chrome::kChromeUIPluginsHost) | 762 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 760 return PluginsUI::GetFaviconResourceBytes(scale_factor); | 763 return PluginsUI::GetFaviconResourceBytes(scale_factor); |
| 761 | 764 |
| 762 #endif | 765 #endif |
| 763 | 766 |
| 764 return NULL; | 767 return NULL; |
| 765 } | 768 } |
| OLD | NEW |