| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 return &NewWebUI<ExternalWebDialogUI>; | 270 return &NewWebUI<ExternalWebDialogUI>; |
| 271 if (url.host() == chrome::kChromeUICloudPrintSetupHost) | 271 if (url.host() == chrome::kChromeUICloudPrintSetupHost) |
| 272 return &NewWebUI<WebDialogUI>; | 272 return &NewWebUI<WebDialogUI>; |
| 273 if (url.host() == chrome::kChromeUIComponentsHost) | 273 if (url.host() == chrome::kChromeUIComponentsHost) |
| 274 return &NewWebUI<ComponentsUI>; | 274 return &NewWebUI<ComponentsUI>; |
| 275 if (url.spec() == chrome::kChromeUIConstrainedHTMLTestURL) | 275 if (url.spec() == chrome::kChromeUIConstrainedHTMLTestURL) |
| 276 return &NewWebUI<ConstrainedWebDialogUI>; | 276 return &NewWebUI<ConstrainedWebDialogUI>; |
| 277 if (url.host() == chrome::kChromeUICrashesHost) | 277 if (url.host() == chrome::kChromeUICrashesHost) |
| 278 return &NewWebUI<CrashesUI>; | 278 return &NewWebUI<CrashesUI>; |
| 279 #if defined(ENABLE_SERVICE_DISCOVERY) | 279 #if defined(ENABLE_SERVICE_DISCOVERY) |
| 280 if (url.host() == chrome::kChromeUIDevicesHost && | 280 if (url.host() == chrome::kChromeUIDevicesHost) { |
| 281 !CommandLine::ForCurrentProcess()->HasSwitch( | |
| 282 switches::kDisableDeviceDiscovery)) { | |
| 283 return &NewWebUI<LocalDiscoveryUI>; | 281 return &NewWebUI<LocalDiscoveryUI>; |
| 284 } | 282 } |
| 285 #endif | 283 #endif |
| 286 if (url.host() == chrome::kChromeUIDomainReliabilityInternalsHost) | 284 if (url.host() == chrome::kChromeUIDomainReliabilityInternalsHost) |
| 287 return &NewWebUI<DomainReliabilityInternalsUI>; | 285 return &NewWebUI<DomainReliabilityInternalsUI>; |
| 288 if (url.host() == chrome::kChromeUIFlagsHost) | 286 if (url.host() == chrome::kChromeUIFlagsHost) |
| 289 return &NewWebUI<FlagsUI>; | 287 return &NewWebUI<FlagsUI>; |
| 290 if (url.host() == chrome::kChromeUIHistoryFrameHost) | 288 if (url.host() == chrome::kChromeUIHistoryFrameHost) |
| 291 return &NewWebUI<HistoryUI>; | 289 return &NewWebUI<HistoryUI>; |
| 292 if (url.host() == chrome::kChromeUIInstantHost) | 290 if (url.host() == chrome::kChromeUIInstantHost) |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 723 #endif | 721 #endif |
| 724 | 722 |
| 725 // Android doesn't use the plugins pages. | 723 // Android doesn't use the plugins pages. |
| 726 if (page_url.host() == chrome::kChromeUIPluginsHost) | 724 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 727 return PluginsUI::GetFaviconResourceBytes(scale_factor); | 725 return PluginsUI::GetFaviconResourceBytes(scale_factor); |
| 728 | 726 |
| 729 #endif | 727 #endif |
| 730 | 728 |
| 731 return NULL; | 729 return NULL; |
| 732 } | 730 } |
| OLD | NEW |