| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/message_loop_proxy.h" | 10 #include "base/message_loop_proxy.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 #include "chrome/browser/ui/webui/net_internals/net_internals_ui.h" | 36 #include "chrome/browser/ui/webui/net_internals/net_internals_ui.h" |
| 37 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" | 37 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" |
| 38 #include "chrome/browser/ui/webui/omnibox/omnibox_ui.h" | 38 #include "chrome/browser/ui/webui/omnibox/omnibox_ui.h" |
| 39 #include "chrome/browser/ui/webui/options/options_ui.h" | 39 #include "chrome/browser/ui/webui/options/options_ui.h" |
| 40 #include "chrome/browser/ui/webui/performance_monitor/performance_monitor_ui.h" | 40 #include "chrome/browser/ui/webui/performance_monitor/performance_monitor_ui.h" |
| 41 #include "chrome/browser/ui/webui/plugins_ui.h" | 41 #include "chrome/browser/ui/webui/plugins_ui.h" |
| 42 #include "chrome/browser/ui/webui/predictors/predictors_ui.h" | 42 #include "chrome/browser/ui/webui/predictors/predictors_ui.h" |
| 43 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" | 43 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" |
| 44 #include "chrome/browser/ui/webui/profiler_ui.h" | 44 #include "chrome/browser/ui/webui/profiler_ui.h" |
| 45 #include "chrome/browser/ui/webui/quota_internals_ui.h" | 45 #include "chrome/browser/ui/webui/quota_internals_ui.h" |
| 46 #include "chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.h" |
| 46 #include "chrome/browser/ui/webui/signin_internals_ui.h" | 47 #include "chrome/browser/ui/webui/signin_internals_ui.h" |
| 47 #include "chrome/browser/ui/webui/sync_internals_ui.h" | 48 #include "chrome/browser/ui/webui/sync_internals_ui.h" |
| 48 #include "chrome/browser/ui/webui/user_actions/user_actions_ui.h" | 49 #include "chrome/browser/ui/webui/user_actions/user_actions_ui.h" |
| 49 #include "chrome/browser/ui/webui/version_ui.h" | 50 #include "chrome/browser/ui/webui/version_ui.h" |
| 50 #include "chrome/common/chrome_switches.h" | 51 #include "chrome/common/chrome_switches.h" |
| 51 #include "chrome/common/extensions/extension_constants.h" | 52 #include "chrome/common/extensions/extension_constants.h" |
| 52 #include "chrome/common/extensions/feature_switch.h" | 53 #include "chrome/common/extensions/feature_switch.h" |
| 53 #include "chrome/common/pref_names.h" | 54 #include "chrome/common/pref_names.h" |
| 54 #include "chrome/common/url_constants.h" | 55 #include "chrome/common/url_constants.h" |
| 55 #include "content/public/browser/web_contents.h" | 56 #include "content/public/browser/web_contents.h" |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 #endif // defined(OS_CHROMEOS) | 335 #endif // defined(OS_CHROMEOS) |
| 335 | 336 |
| 336 /**************************************************************************** | 337 /**************************************************************************** |
| 337 * Other #defines and special logics. | 338 * Other #defines and special logics. |
| 338 ***************************************************************************/ | 339 ***************************************************************************/ |
| 339 #if defined(ENABLE_CONFIGURATION_POLICY) | 340 #if defined(ENABLE_CONFIGURATION_POLICY) |
| 340 if (url.host() == chrome::kChromeUIPolicyHost) | 341 if (url.host() == chrome::kChromeUIPolicyHost) |
| 341 return &NewWebUI<PolicyUI>; | 342 return &NewWebUI<PolicyUI>; |
| 342 #endif | 343 #endif |
| 343 | 344 |
| 345 #if defined(ENABLE_CONFIGURATION_POLICY) && !defined(OS_CHROMEOS) |
| 346 if (url.host() == chrome::kChromeUIProfileSigninConfirmationHost) |
| 347 return &NewWebUI<ProfileSigninConfirmationUI>; |
| 348 #endif |
| 349 |
| 344 #if (defined(OS_LINUX) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA) | 350 #if (defined(OS_LINUX) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA) |
| 345 if (url.host() == chrome::kChromeUITabModalConfirmDialogHost) { | 351 if (url.host() == chrome::kChromeUITabModalConfirmDialogHost) { |
| 346 return &NewWebUI<ConstrainedWebDialogUI>; | 352 return &NewWebUI<ConstrainedWebDialogUI>; |
| 347 } | 353 } |
| 348 #endif | 354 #endif |
| 349 | 355 |
| 350 #if defined(USE_AURA) | 356 #if defined(USE_AURA) |
| 351 if (url.host() == chrome::kChromeUIGestureConfigHost) | 357 if (url.host() == chrome::kChromeUIGestureConfigHost) |
| 352 return &NewWebUI<GestureConfigUI>; | 358 return &NewWebUI<GestureConfigUI>; |
| 353 #endif | 359 #endif |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 if (page_url.host() == chrome::kChromeUISettingsFrameHost) | 565 if (page_url.host() == chrome::kChromeUISettingsFrameHost) |
| 560 return options::OptionsUI::GetFaviconResourceBytes(scale_factor); | 566 return options::OptionsUI::GetFaviconResourceBytes(scale_factor); |
| 561 | 567 |
| 562 // Android doesn't use the plugins pages. | 568 // Android doesn't use the plugins pages. |
| 563 if (page_url.host() == chrome::kChromeUIPluginsHost) | 569 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 564 return PluginsUI::GetFaviconResourceBytes(scale_factor); | 570 return PluginsUI::GetFaviconResourceBytes(scale_factor); |
| 565 #endif | 571 #endif |
| 566 | 572 |
| 567 return NULL; | 573 return NULL; |
| 568 } | 574 } |
| OLD | NEW |