| 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 26 matching lines...) Expand all Loading... |
| 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/quota_internals_ui.h" | 45 #include "chrome/browser/ui/webui/quota_internals/quota_internals_ui.h" |
| 46 #include "chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.h" | 46 #include "chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.h" |
| 47 #include "chrome/browser/ui/webui/signin/user_chooser_ui.h" |
| 47 #include "chrome/browser/ui/webui/signin_internals_ui.h" | 48 #include "chrome/browser/ui/webui/signin_internals_ui.h" |
| 48 #include "chrome/browser/ui/webui/sync_internals_ui.h" | 49 #include "chrome/browser/ui/webui/sync_internals_ui.h" |
| 49 #include "chrome/browser/ui/webui/translate_internals/translate_internals_ui.h" | 50 #include "chrome/browser/ui/webui/translate_internals/translate_internals_ui.h" |
| 50 #include "chrome/browser/ui/webui/user_actions/user_actions_ui.h" | 51 #include "chrome/browser/ui/webui/user_actions/user_actions_ui.h" |
| 51 #include "chrome/browser/ui/webui/version_ui.h" | 52 #include "chrome/browser/ui/webui/version_ui.h" |
| 52 #include "chrome/common/chrome_switches.h" | 53 #include "chrome/common/chrome_switches.h" |
| 53 #include "chrome/common/extensions/extension_constants.h" | 54 #include "chrome/common/extensions/extension_constants.h" |
| 54 #include "chrome/common/extensions/feature_switch.h" | 55 #include "chrome/common/extensions/feature_switch.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" |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 // use the NTP WebUI. We don't want to return NULL if the sync promo page | 379 // use the NTP WebUI. We don't want to return NULL if the sync promo page |
| 379 // is disabled because the page can be disabled mid-flight (for example, | 380 // is disabled because the page can be disabled mid-flight (for example, |
| 380 // if sync login finishes). | 381 // if sync login finishes). |
| 381 if (SyncPromoUI::ShouldShowSyncPromo(profile)) | 382 if (SyncPromoUI::ShouldShowSyncPromo(profile)) |
| 382 return &NewWebUI<SyncPromoUI>; | 383 return &NewWebUI<SyncPromoUI>; |
| 383 else | 384 else |
| 384 return &NewWebUI<NewTabUI>; | 385 return &NewWebUI<NewTabUI>; |
| 385 } | 386 } |
| 386 #endif | 387 #endif |
| 387 | 388 |
| 389 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) && !defined(OS_IOS) |
| 390 if (url.host() == chrome::kChromeUIUserChooserHost) |
| 391 return &NewWebUI<UserChooserUI>; |
| 392 #endif |
| 393 |
| 388 if (url.host() == chrome::kChromeUIChromeURLsHost || | 394 if (url.host() == chrome::kChromeUIChromeURLsHost || |
| 389 url.host() == chrome::kChromeUICreditsHost || | 395 url.host() == chrome::kChromeUICreditsHost || |
| 390 url.host() == chrome::kChromeUIDNSHost || | 396 url.host() == chrome::kChromeUIDNSHost || |
| 391 url.host() == chrome::kChromeUIMemoryHost || | 397 url.host() == chrome::kChromeUIMemoryHost || |
| 392 url.host() == chrome::kChromeUIMemoryRedirectHost || | 398 url.host() == chrome::kChromeUIMemoryRedirectHost || |
| 393 url.host() == chrome::kChromeUIStatsHost || | 399 url.host() == chrome::kChromeUIStatsHost || |
| 394 url.host() == chrome::kChromeUITermsHost | 400 url.host() == chrome::kChromeUITermsHost |
| 395 #if defined(OS_LINUX) || defined(OS_OPENBSD) | 401 #if defined(OS_LINUX) || defined(OS_OPENBSD) |
| 396 || url.host() == chrome::kChromeUILinuxProxyConfigHost | 402 || url.host() == chrome::kChromeUILinuxProxyConfigHost |
| 397 || url.host() == chrome::kChromeUISandboxHost | 403 || url.host() == chrome::kChromeUISandboxHost |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 if (page_url.host() == chrome::kChromeUISettingsFrameHost) | 584 if (page_url.host() == chrome::kChromeUISettingsFrameHost) |
| 579 return options::OptionsUI::GetFaviconResourceBytes(scale_factor); | 585 return options::OptionsUI::GetFaviconResourceBytes(scale_factor); |
| 580 | 586 |
| 581 // Android doesn't use the plugins pages. | 587 // Android doesn't use the plugins pages. |
| 582 if (page_url.host() == chrome::kChromeUIPluginsHost) | 588 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 583 return PluginsUI::GetFaviconResourceBytes(scale_factor); | 589 return PluginsUI::GetFaviconResourceBytes(scale_factor); |
| 584 #endif | 590 #endif |
| 585 | 591 |
| 586 return NULL; | 592 return NULL; |
| 587 } | 593 } |
| OLD | NEW |