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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 #endif | 247 #endif |
248 if (CommandLine::ForCurrentProcess()->HasSwitch( | 248 if (CommandLine::ForCurrentProcess()->HasSwitch( |
249 switches::kEnableDomDistiller) && | 249 switches::kEnableDomDistiller) && |
250 url.host() == dom_distiller::kChromeUIDomDistillerHost) { | 250 url.host() == dom_distiller::kChromeUIDomDistillerHost) { |
251 return &NewWebUI<dom_distiller::DomDistillerUI>; | 251 return &NewWebUI<dom_distiller::DomDistillerUI>; |
252 } | 252 } |
253 if (url.host() == chrome::kChromeUIFlagsHost) | 253 if (url.host() == chrome::kChromeUIFlagsHost) |
254 return &NewWebUI<FlagsUI>; | 254 return &NewWebUI<FlagsUI>; |
255 if (url.host() == chrome::kChromeUIHistoryFrameHost) | 255 if (url.host() == chrome::kChromeUIHistoryFrameHost) |
256 return &NewWebUI<HistoryUI>; | 256 return &NewWebUI<HistoryUI>; |
257 if (url.host() == chrome::kChromeUIChromeSigninHost) | |
258 return &NewWebUI<InlineLoginUI>; | |
259 if (url.host() == chrome::kChromeUIInstantHost) | 257 if (url.host() == chrome::kChromeUIInstantHost) |
260 return &NewWebUI<InstantUI>; | 258 return &NewWebUI<InstantUI>; |
261 if (url.host() == chrome::kChromeUIManagedUserPassphrasePageHost) | 259 if (url.host() == chrome::kChromeUIManagedUserPassphrasePageHost) |
262 return &NewWebUI<ConstrainedWebDialogUI>; | 260 return &NewWebUI<ConstrainedWebDialogUI>; |
263 if (url.host() == chrome::kChromeUIMemoryInternalsHost) | 261 if (url.host() == chrome::kChromeUIMemoryInternalsHost) |
264 return &NewWebUI<MemoryInternalsUI>; | 262 return &NewWebUI<MemoryInternalsUI>; |
265 #if !defined(DISABLE_NACL) | 263 #if !defined(DISABLE_NACL) |
266 if (url.host() == chrome::kChromeUINaClHost) | 264 if (url.host() == chrome::kChromeUINaClHost) |
267 return &NewWebUI<NaClUI>; | 265 return &NewWebUI<NaClUI>; |
268 #endif | 266 #endif |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 return &NewWebUI<chromeos::SimUnlockUI>; | 398 return &NewWebUI<chromeos::SimUnlockUI>; |
401 if (url.host() == chrome::kChromeUISlowHost) | 399 if (url.host() == chrome::kChromeUISlowHost) |
402 return &NewWebUI<chromeos::SlowUI>; | 400 return &NewWebUI<chromeos::SlowUI>; |
403 if (url.host() == chrome::kChromeUISlowTraceHost) | 401 if (url.host() == chrome::kChromeUISlowTraceHost) |
404 return &NewWebUI<chromeos::SlowTraceController>; | 402 return &NewWebUI<chromeos::SlowTraceController>; |
405 if (url.host() == chrome::kChromeUISystemInfoHost) | 403 if (url.host() == chrome::kChromeUISystemInfoHost) |
406 return &NewWebUI<chromeos::SystemInfoUI>; | 404 return &NewWebUI<chromeos::SystemInfoUI>; |
407 if (url.host() == chrome::kChromeUINetworkHost) | 405 if (url.host() == chrome::kChromeUINetworkHost) |
408 return &NewWebUI<chromeos::NetworkUI>; | 406 return &NewWebUI<chromeos::NetworkUI>; |
409 #endif // defined(OS_CHROMEOS) | 407 #endif // defined(OS_CHROMEOS) |
| 408 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
| 409 if (url.host() == chrome::kChromeUIChromeSigninHost) |
| 410 return &NewWebUI<InlineLoginUI>; |
| 411 #endif |
410 | 412 |
411 /**************************************************************************** | 413 /**************************************************************************** |
412 * Other #defines and special logics. | 414 * Other #defines and special logics. |
413 ***************************************************************************/ | 415 ***************************************************************************/ |
414 #if defined(ENABLE_CONFIGURATION_POLICY) | 416 #if defined(ENABLE_CONFIGURATION_POLICY) |
415 if (url.host() == chrome::kChromeUIPolicyHost) | 417 if (url.host() == chrome::kChromeUIPolicyHost) |
416 return &NewWebUI<PolicyUI>; | 418 return &NewWebUI<PolicyUI>; |
417 | 419 |
418 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) | 420 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) |
419 if (url.host() == chrome::kChromeUIProfileSigninConfirmationHost) | 421 if (url.host() == chrome::kChromeUIProfileSigninConfirmationHost) |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 if (page_url.host() == chrome::kChromeUIPluginsHost) | 646 if (page_url.host() == chrome::kChromeUIPluginsHost) |
645 return PluginsUI::GetFaviconResourceBytes(scale_factor); | 647 return PluginsUI::GetFaviconResourceBytes(scale_factor); |
646 | 648 |
647 // Android doesn't use the components pages. | 649 // Android doesn't use the components pages. |
648 if (page_url.host() == chrome::kChromeUIComponentsHost) | 650 if (page_url.host() == chrome::kChromeUIComponentsHost) |
649 return ComponentsUI::GetFaviconResourceBytes(scale_factor); | 651 return ComponentsUI::GetFaviconResourceBytes(scale_factor); |
650 #endif | 652 #endif |
651 | 653 |
652 return NULL; | 654 return NULL; |
653 } | 655 } |
OLD | NEW |