| 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 #endif | 246 #endif |
| 247 if (CommandLine::ForCurrentProcess()->HasSwitch( | 247 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 248 switches::kEnableDomDistiller) && | 248 switches::kEnableDomDistiller) && |
| 249 url.host() == dom_distiller::kChromeUIDomDistillerHost) { | 249 url.host() == dom_distiller::kChromeUIDomDistillerHost) { |
| 250 return &NewWebUI<dom_distiller::DomDistillerUI>; | 250 return &NewWebUI<dom_distiller::DomDistillerUI>; |
| 251 } | 251 } |
| 252 if (url.host() == chrome::kChromeUIFlagsHost) | 252 if (url.host() == chrome::kChromeUIFlagsHost) |
| 253 return &NewWebUI<FlagsUI>; | 253 return &NewWebUI<FlagsUI>; |
| 254 if (url.host() == chrome::kChromeUIHistoryFrameHost) | 254 if (url.host() == chrome::kChromeUIHistoryFrameHost) |
| 255 return &NewWebUI<HistoryUI>; | 255 return &NewWebUI<HistoryUI>; |
| 256 if (url.host() == chrome::kChromeUIInlineLoginHost) | 256 if (url.host() == chrome::kChromeUIChromeSigninHost) |
| 257 return &NewWebUI<InlineLoginUI>; | 257 return &NewWebUI<InlineLoginUI>; |
| 258 if (url.host() == chrome::kChromeUIInstantHost) | 258 if (url.host() == chrome::kChromeUIInstantHost) |
| 259 return &NewWebUI<InstantUI>; | 259 return &NewWebUI<InstantUI>; |
| 260 if (url.host() == chrome::kChromeUIManagedUserPassphrasePageHost) | 260 if (url.host() == chrome::kChromeUIManagedUserPassphrasePageHost) |
| 261 return &NewWebUI<ConstrainedWebDialogUI>; | 261 return &NewWebUI<ConstrainedWebDialogUI>; |
| 262 if (url.host() == chrome::kChromeUIMemoryInternalsHost) | 262 if (url.host() == chrome::kChromeUIMemoryInternalsHost) |
| 263 return &NewWebUI<MemoryInternalsUI>; | 263 return &NewWebUI<MemoryInternalsUI>; |
| 264 #if !defined(DISABLE_NACL) | 264 #if !defined(DISABLE_NACL) |
| 265 if (url.host() == chrome::kChromeUINaClHost) | 265 if (url.host() == chrome::kChromeUINaClHost) |
| 266 return &NewWebUI<NaClUI>; | 266 return &NewWebUI<NaClUI>; |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 if (page_url.host() == chrome::kChromeUIPluginsHost) | 645 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 646 return PluginsUI::GetFaviconResourceBytes(scale_factor); | 646 return PluginsUI::GetFaviconResourceBytes(scale_factor); |
| 647 | 647 |
| 648 // Android doesn't use the components pages. | 648 // Android doesn't use the components pages. |
| 649 if (page_url.host() == chrome::kChromeUIComponentsHost) | 649 if (page_url.host() == chrome::kChromeUIComponentsHost) |
| 650 return ComponentsUI::GetFaviconResourceBytes(scale_factor); | 650 return ComponentsUI::GetFaviconResourceBytes(scale_factor); |
| 651 #endif | 651 #endif |
| 652 | 652 |
| 653 return NULL; | 653 return NULL; |
| 654 } | 654 } |
| OLD | NEW |