| 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/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" | 39 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" |
| 40 #include "chrome/browser/ui/webui/omnibox/omnibox_ui.h" | 40 #include "chrome/browser/ui/webui/omnibox/omnibox_ui.h" |
| 41 #include "chrome/browser/ui/webui/options/options_ui.h" | 41 #include "chrome/browser/ui/webui/options/options_ui.h" |
| 42 #include "chrome/browser/ui/webui/performance_monitor/performance_monitor_ui.h" | 42 #include "chrome/browser/ui/webui/performance_monitor/performance_monitor_ui.h" |
| 43 #include "chrome/browser/ui/webui/plugins_ui.h" | 43 #include "chrome/browser/ui/webui/plugins_ui.h" |
| 44 #include "chrome/browser/ui/webui/predictors/predictors_ui.h" | 44 #include "chrome/browser/ui/webui/predictors/predictors_ui.h" |
| 45 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" | 45 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" |
| 46 #include "chrome/browser/ui/webui/profiler_ui.h" | 46 #include "chrome/browser/ui/webui/profiler_ui.h" |
| 47 #include "chrome/browser/ui/webui/quota_internals/quota_internals_ui.h" | 47 #include "chrome/browser/ui/webui/quota_internals/quota_internals_ui.h" |
| 48 #include "chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.h" | 48 #include "chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.h" |
| 49 #include "chrome/browser/ui/webui/signin/user_chooser_ui.h" |
| 49 #include "chrome/browser/ui/webui/signin_internals_ui.h" | 50 #include "chrome/browser/ui/webui/signin_internals_ui.h" |
| 50 #include "chrome/browser/ui/webui/sync_internals_ui.h" | 51 #include "chrome/browser/ui/webui/sync_internals_ui.h" |
| 51 #include "chrome/browser/ui/webui/translate_internals/translate_internals_ui.h" | 52 #include "chrome/browser/ui/webui/translate_internals/translate_internals_ui.h" |
| 52 #include "chrome/browser/ui/webui/user_actions/user_actions_ui.h" | 53 #include "chrome/browser/ui/webui/user_actions/user_actions_ui.h" |
| 53 #include "chrome/browser/ui/webui/version_ui.h" | 54 #include "chrome/browser/ui/webui/version_ui.h" |
| 54 #include "chrome/common/chrome_switches.h" | 55 #include "chrome/common/chrome_switches.h" |
| 55 #include "chrome/common/extensions/extension_constants.h" | 56 #include "chrome/common/extensions/extension_constants.h" |
| 56 #include "chrome/common/extensions/feature_switch.h" | 57 #include "chrome/common/extensions/feature_switch.h" |
| 57 #include "chrome/common/pref_names.h" | 58 #include "chrome/common/pref_names.h" |
| 58 #include "chrome/common/url_constants.h" | 59 #include "chrome/common/url_constants.h" |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 } | 385 } |
| 385 #endif | 386 #endif |
| 386 | 387 |
| 387 #if defined(USE_AURA) | 388 #if defined(USE_AURA) |
| 388 if (url.host() == chrome::kChromeUIGestureConfigHost) | 389 if (url.host() == chrome::kChromeUIGestureConfigHost) |
| 389 return &NewWebUI<GestureConfigUI>; | 390 return &NewWebUI<GestureConfigUI>; |
| 390 if (url.host() == keyboard::kKeyboardWebUIHost) | 391 if (url.host() == keyboard::kKeyboardWebUIHost) |
| 391 return &NewWebUI<keyboard::KeyboardUIController>; | 392 return &NewWebUI<keyboard::KeyboardUIController>; |
| 392 #endif | 393 #endif |
| 393 | 394 |
| 395 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) && !defined(OS_IOS) |
| 396 if (url.host() == chrome::kChromeUIUserChooserHost && |
| 397 CommandLine::ForCurrentProcess()->HasSwitch( |
| 398 switches::kNewProfileManagement)) |
| 399 return &NewWebUI<UserChooserUI>; |
| 400 #endif |
| 401 |
| 394 if (url.host() == chrome::kChromeUIChromeURLsHost || | 402 if (url.host() == chrome::kChromeUIChromeURLsHost || |
| 395 url.host() == chrome::kChromeUICreditsHost || | 403 url.host() == chrome::kChromeUICreditsHost || |
| 396 url.host() == chrome::kChromeUIDNSHost || | 404 url.host() == chrome::kChromeUIDNSHost || |
| 397 url.host() == chrome::kChromeUIMemoryHost || | 405 url.host() == chrome::kChromeUIMemoryHost || |
| 398 url.host() == chrome::kChromeUIMemoryRedirectHost || | 406 url.host() == chrome::kChromeUIMemoryRedirectHost || |
| 399 url.host() == chrome::kChromeUIStatsHost || | 407 url.host() == chrome::kChromeUIStatsHost || |
| 400 url.host() == chrome::kChromeUITermsHost | 408 url.host() == chrome::kChromeUITermsHost |
| 401 #if defined(OS_LINUX) || defined(OS_OPENBSD) | 409 #if defined(OS_LINUX) || defined(OS_OPENBSD) |
| 402 || url.host() == chrome::kChromeUILinuxProxyConfigHost | 410 || url.host() == chrome::kChromeUILinuxProxyConfigHost |
| 403 || url.host() == chrome::kChromeUISandboxHost | 411 || url.host() == chrome::kChromeUISandboxHost |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 if (page_url.host() == chrome::kChromeUISettingsFrameHost) | 592 if (page_url.host() == chrome::kChromeUISettingsFrameHost) |
| 585 return options::OptionsUI::GetFaviconResourceBytes(scale_factor); | 593 return options::OptionsUI::GetFaviconResourceBytes(scale_factor); |
| 586 | 594 |
| 587 // Android doesn't use the plugins pages. | 595 // Android doesn't use the plugins pages. |
| 588 if (page_url.host() == chrome::kChromeUIPluginsHost) | 596 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 589 return PluginsUI::GetFaviconResourceBytes(scale_factor); | 597 return PluginsUI::GetFaviconResourceBytes(scale_factor); |
| 590 #endif | 598 #endif |
| 591 | 599 |
| 592 return NULL; | 600 return NULL; |
| 593 } | 601 } |
| OLD | NEW |