| 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/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/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 #include "chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.h" | 64 #include "chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.h" |
| 65 #include "chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.h" | 65 #include "chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.h" |
| 66 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 66 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
| 67 #include "chrome/browser/ui/webui/chromeos/mobile_setup_ui.h" | 67 #include "chrome/browser/ui/webui/chromeos/mobile_setup_ui.h" |
| 68 #include "chrome/browser/ui/webui/chromeos/proxy_settings_ui.h" | 68 #include "chrome/browser/ui/webui/chromeos/proxy_settings_ui.h" |
| 69 #include "chrome/browser/ui/webui/chromeos/register_page_ui.h" | 69 #include "chrome/browser/ui/webui/chromeos/register_page_ui.h" |
| 70 #include "chrome/browser/ui/webui/chromeos/sim_unlock_ui.h" | 70 #include "chrome/browser/ui/webui/chromeos/sim_unlock_ui.h" |
| 71 #include "chrome/browser/ui/webui/chromeos/system_info_ui.h" | 71 #include "chrome/browser/ui/webui/chromeos/system_info_ui.h" |
| 72 #endif | 72 #endif |
| 73 | 73 |
| 74 #if defined(USE_AURA) |
| 75 #include "chrome/browser/ui/webui/gesture_config_ui.h" |
| 76 #endif |
| 77 |
| 74 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) | 78 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) |
| 75 #include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h" | 79 #include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h" |
| 76 #endif | 80 #endif |
| 77 | 81 |
| 78 #if defined(OS_WIN) | 82 #if defined(OS_WIN) |
| 79 #include "chrome/browser/ui/webui/conflicts_ui.h" | 83 #include "chrome/browser/ui/webui/conflicts_ui.h" |
| 80 #endif | 84 #endif |
| 81 | 85 |
| 82 #if (defined(USE_NSS) || defined(USE_OPENSSL)) && defined(USE_AURA) | 86 #if (defined(USE_NSS) || defined(USE_OPENSSL)) && defined(USE_AURA) |
| 83 #include "chrome/browser/ui/webui/certificate_viewer_ui.h" | 87 #include "chrome/browser/ui/webui/certificate_viewer_ui.h" |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 #endif // defined(ENABLE_TASK_MANAGER) | 291 #endif // defined(ENABLE_TASK_MANAGER) |
| 288 | 292 |
| 289 #if (defined(OS_LINUX) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA) | 293 #if (defined(OS_LINUX) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA) |
| 290 if (url.host() == chrome::kChromeUICollectedCookiesHost || | 294 if (url.host() == chrome::kChromeUICollectedCookiesHost || |
| 291 url.host() == chrome::kChromeUIHttpAuthHost || | 295 url.host() == chrome::kChromeUIHttpAuthHost || |
| 292 url.host() == chrome::kChromeUITabModalConfirmDialogHost) { | 296 url.host() == chrome::kChromeUITabModalConfirmDialogHost) { |
| 293 return &NewWebUI<ConstrainedWebDialogUI>; | 297 return &NewWebUI<ConstrainedWebDialogUI>; |
| 294 } | 298 } |
| 295 #endif | 299 #endif |
| 296 | 300 |
| 301 #if defined(USE_AURA) |
| 302 if (url.host() == chrome::kChromeUIGestureConfigHost) |
| 303 return &NewWebUI<GestureConfigUI>; |
| 304 #endif |
| 305 |
| 297 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) | 306 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) |
| 298 if (url.host() == chrome::kChromeUISyncPromoHost) { | 307 if (url.host() == chrome::kChromeUISyncPromoHost) { |
| 299 // If the sync promo page is enabled then use the sync promo WebUI otherwise | 308 // If the sync promo page is enabled then use the sync promo WebUI otherwise |
| 300 // use the NTP WebUI. We don't want to return NULL if the sync promo page | 309 // use the NTP WebUI. We don't want to return NULL if the sync promo page |
| 301 // is disabled because the page can be disabled mid-flight (for example, | 310 // is disabled because the page can be disabled mid-flight (for example, |
| 302 // if sync login finishes). | 311 // if sync login finishes). |
| 303 if (SyncPromoUI::ShouldShowSyncPromo(profile)) | 312 if (SyncPromoUI::ShouldShowSyncPromo(profile)) |
| 304 return &NewWebUI<SyncPromoUI>; | 313 return &NewWebUI<SyncPromoUI>; |
| 305 else | 314 else |
| 306 return &NewWebUI<NewTabUI>; | 315 return &NewWebUI<NewTabUI>; |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 if (page_url.host() == chrome::kChromeUISettingsFrameHost) | 510 if (page_url.host() == chrome::kChromeUISettingsFrameHost) |
| 502 return options2::OptionsUI::GetFaviconResourceBytes(); | 511 return options2::OptionsUI::GetFaviconResourceBytes(); |
| 503 | 512 |
| 504 // Android doesn't use the plugins pages. | 513 // Android doesn't use the plugins pages. |
| 505 if (page_url.host() == chrome::kChromeUIPluginsHost) | 514 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 506 return PluginsUI::GetFaviconResourceBytes(); | 515 return PluginsUI::GetFaviconResourceBytes(); |
| 507 #endif | 516 #endif |
| 508 | 517 |
| 509 return NULL; | 518 return NULL; |
| 510 } | 519 } |
| OLD | NEW |