| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 if (url.host() == chrome::kChromeUICloudPrintResourcesHost) | 225 if (url.host() == chrome::kChromeUICloudPrintResourcesHost) |
| 226 return &NewWebUI<ExternalWebDialogUI>; | 226 return &NewWebUI<ExternalWebDialogUI>; |
| 227 if (url.host() == chrome::kChromeUICloudPrintSetupHost) | 227 if (url.host() == chrome::kChromeUICloudPrintSetupHost) |
| 228 return &NewWebUI<WebDialogUI>; | 228 return &NewWebUI<WebDialogUI>; |
| 229 if (url.spec() == chrome::kChromeUIConstrainedHTMLTestURL) | 229 if (url.spec() == chrome::kChromeUIConstrainedHTMLTestURL) |
| 230 return &NewWebUI<ConstrainedWebDialogUI>; | 230 return &NewWebUI<ConstrainedWebDialogUI>; |
| 231 if (url.host() == chrome::kChromeUICrashesHost) | 231 if (url.host() == chrome::kChromeUICrashesHost) |
| 232 return &NewWebUI<CrashesUI>; | 232 return &NewWebUI<CrashesUI>; |
| 233 #if defined(ENABLE_MDNS) | 233 #if defined(ENABLE_MDNS) |
| 234 if (url.host() == chrome::kChromeUIDevicesFrameHost && | 234 if (url.host() == chrome::kChromeUIDevicesFrameHost && |
| 235 CommandLine::ForCurrentProcess()->HasSwitch( | 235 !CommandLine::ForCurrentProcess()->HasSwitch( |
| 236 switches::kEnableDeviceDiscovery)) { | 236 switches::kDisableDeviceDiscovery)) { |
| 237 return &NewWebUI<LocalDiscoveryUI>; | 237 return &NewWebUI<LocalDiscoveryUI>; |
| 238 } | 238 } |
| 239 #endif | 239 #endif |
| 240 if (url.host() == chrome::kChromeUIFlagsHost) | 240 if (url.host() == chrome::kChromeUIFlagsHost) |
| 241 return &NewWebUI<FlagsUI>; | 241 return &NewWebUI<FlagsUI>; |
| 242 if (url.host() == chrome::kChromeUIHistoryFrameHost) | 242 if (url.host() == chrome::kChromeUIHistoryFrameHost) |
| 243 return &NewWebUI<HistoryUI>; | 243 return &NewWebUI<HistoryUI>; |
| 244 if (url.host() == chrome::kChromeUIInlineLoginHost) | 244 if (url.host() == chrome::kChromeUIInlineLoginHost) |
| 245 return &NewWebUI<InlineLoginUI>; | 245 return &NewWebUI<InlineLoginUI>; |
| 246 if (url.host() == chrome::kChromeUIInstantHost) | 246 if (url.host() == chrome::kChromeUIInstantHost) |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 if (page_url.host() == chrome::kChromeUIPluginsHost) | 622 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 623 return PluginsUI::GetFaviconResourceBytes(scale_factor); | 623 return PluginsUI::GetFaviconResourceBytes(scale_factor); |
| 624 | 624 |
| 625 // Android doesn't use the components pages. | 625 // Android doesn't use the components pages. |
| 626 if (page_url.host() == chrome::kChromeUIComponentsHost) | 626 if (page_url.host() == chrome::kChromeUIComponentsHost) |
| 627 return ComponentsUI::GetFaviconResourceBytes(scale_factor); | 627 return ComponentsUI::GetFaviconResourceBytes(scale_factor); |
| 628 #endif | 628 #endif |
| 629 | 629 |
| 630 return NULL; | 630 return NULL; |
| 631 } | 631 } |
| OLD | NEW |