| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 #if defined(USE_AURA) | 74 #if defined(USE_AURA) |
| 75 #include "chrome/browser/ui/webui/gesture_config_ui.h" | 75 #include "chrome/browser/ui/webui/gesture_config_ui.h" |
| 76 #endif | 76 #endif |
| 77 | 77 |
| 78 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) | 78 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) |
| 79 #include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h" | 79 #include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h" |
| 80 #endif | 80 #endif |
| 81 | 81 |
| 82 #if defined(OS_WIN) | 82 #if defined(OS_WIN) |
| 83 #include "chrome/browser/ui/webui/conflicts_ui.h" | 83 #include "chrome/browser/ui/webui/conflicts_ui.h" |
| 84 #include "chrome/browser/ui/webui/set_as_metro_default_ui.h" |
| 84 #endif | 85 #endif |
| 85 | 86 |
| 86 #if (defined(USE_NSS) || defined(USE_OPENSSL)) && defined(USE_AURA) | 87 #if (defined(USE_NSS) || defined(USE_OPENSSL)) && defined(USE_AURA) |
| 87 #include "chrome/browser/ui/webui/certificate_viewer_ui.h" | 88 #include "chrome/browser/ui/webui/certificate_viewer_ui.h" |
| 88 #endif | 89 #endif |
| 89 | 90 |
| 90 using content::WebUI; | 91 using content::WebUI; |
| 91 using content::WebUIController; | 92 using content::WebUIController; |
| 92 using ui::ConstrainedWebDialogUI; | 93 using ui::ConstrainedWebDialogUI; |
| 93 using ui::ExternalWebDialogUI; | 94 using ui::ExternalWebDialogUI; |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 #if defined(ENABLE_PRINTING) | 245 #if defined(ENABLE_PRINTING) |
| 245 if (url.host() == chrome::kChromeUIPrintHost && | 246 if (url.host() == chrome::kChromeUIPrintHost && |
| 246 !g_browser_process->local_state()->GetBoolean( | 247 !g_browser_process->local_state()->GetBoolean( |
| 247 prefs::kPrintPreviewDisabled)) { | 248 prefs::kPrintPreviewDisabled)) { |
| 248 return &NewWebUI<PrintPreviewUI>; | 249 return &NewWebUI<PrintPreviewUI>; |
| 249 } | 250 } |
| 250 #endif | 251 #endif |
| 251 #if defined(OS_WIN) | 252 #if defined(OS_WIN) |
| 252 if (url.host() == chrome::kChromeUIConflictsHost) | 253 if (url.host() == chrome::kChromeUIConflictsHost) |
| 253 return &NewWebUI<ConflictsUI>; | 254 return &NewWebUI<ConflictsUI>; |
| 255 if (url.host() == chrome::kChromeUIMetroFlowHost) |
| 256 return &NewWebUI<SetAsMetroDefaultUI>; |
| 254 #endif | 257 #endif |
| 255 #if (defined(USE_NSS) || defined(USE_OPENSSL)) && defined(USE_AURA) | 258 #if (defined(USE_NSS) || defined(USE_OPENSSL)) && defined(USE_AURA) |
| 256 if (url.host() == chrome::kChromeUICertificateViewerHost) | 259 if (url.host() == chrome::kChromeUICertificateViewerHost) |
| 257 return &NewWebUI<CertificateViewerUI>; | 260 return &NewWebUI<CertificateViewerUI>; |
| 258 #endif | 261 #endif |
| 259 #if defined(OS_CHROMEOS) | 262 #if defined(OS_CHROMEOS) |
| 260 if (url.host() == chrome::kChromeUIChooseMobileNetworkHost) | 263 if (url.host() == chrome::kChromeUIChooseMobileNetworkHost) |
| 261 return &NewWebUI<chromeos::ChooseMobileNetworkUI>; | 264 return &NewWebUI<chromeos::ChooseMobileNetworkUI>; |
| 262 if (url.host() == chrome::kChromeUIImageBurnerHost) | 265 if (url.host() == chrome::kChromeUIImageBurnerHost) |
| 263 return &NewWebUI<ImageBurnUI>; | 266 return &NewWebUI<ImageBurnUI>; |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 if (page_url.host() == chrome::kChromeUISettingsFrameHost) | 509 if (page_url.host() == chrome::kChromeUISettingsFrameHost) |
| 507 return options2::OptionsUI::GetFaviconResourceBytes(); | 510 return options2::OptionsUI::GetFaviconResourceBytes(); |
| 508 | 511 |
| 509 // Android doesn't use the plugins pages. | 512 // Android doesn't use the plugins pages. |
| 510 if (page_url.host() == chrome::kChromeUIPluginsHost) | 513 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 511 return PluginsUI::GetFaviconResourceBytes(); | 514 return PluginsUI::GetFaviconResourceBytes(); |
| 512 #endif | 515 #endif |
| 513 | 516 |
| 514 return NULL; | 517 return NULL; |
| 515 } | 518 } |
| OLD | NEW |