| 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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 return &NewWebUI<HelpUI>; | 391 return &NewWebUI<HelpUI>; |
| 392 // Identity API is not available on Android. | 392 // Identity API is not available on Android. |
| 393 if (url.host() == chrome::kChromeUIIdentityInternalsHost) | 393 if (url.host() == chrome::kChromeUIIdentityInternalsHost) |
| 394 return &NewWebUI<IdentityInternalsUI>; | 394 return &NewWebUI<IdentityInternalsUI>; |
| 395 if (url.host() == chrome::kChromeUINewTabHost) | 395 if (url.host() == chrome::kChromeUINewTabHost) |
| 396 return &NewWebUI<NewTabUI>; | 396 return &NewWebUI<NewTabUI>; |
| 397 if (url.host() == chrome::kChromeUIMdSettingsHost && | 397 if (url.host() == chrome::kChromeUIMdSettingsHost && |
| 398 ::switches::MdSettingsEnabled()) { | 398 ::switches::MdSettingsEnabled()) { |
| 399 return &NewWebUI<settings::MdSettingsUI>; | 399 return &NewWebUI<settings::MdSettingsUI>; |
| 400 } | 400 } |
| 401 // If the material design extensions page is enabled, it gets its own host. |
| 402 // Otherwise, it's handled by the uber settings page. |
| 403 if (url.host() == chrome::kChromeUIExtensionsHost && |
| 404 ::switches::MdExtensionsEnabled()) { |
| 405 return &NewWebUI<extensions::ExtensionsUI>; |
| 406 } |
| 401 if (url.host() == chrome::kChromeUIQuotaInternalsHost) | 407 if (url.host() == chrome::kChromeUIQuotaInternalsHost) |
| 402 return &NewWebUI<QuotaInternalsUI>; | 408 return &NewWebUI<QuotaInternalsUI>; |
| 403 // Settings are implemented with native UI elements on Android. | 409 // Settings are implemented with native UI elements on Android. |
| 404 // Handle chrome://settings if settings in a window and about in settings | 410 // Handle chrome://settings if settings in a window and about in settings |
| 405 // are enabled. | 411 // are enabled. |
| 406 if (url.host() == chrome::kChromeUISettingsFrameHost || | 412 if (url.host() == chrome::kChromeUISettingsFrameHost || |
| 407 (url.host() == chrome::kChromeUISettingsHost && | 413 (url.host() == chrome::kChromeUISettingsHost && |
| 408 ::switches::AboutInSettingsEnabled())) { | 414 ::switches::AboutInSettingsEnabled())) { |
| 409 return &NewWebUI<options::OptionsUI>; | 415 return &NewWebUI<options::OptionsUI>; |
| 410 } | 416 } |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 764 #endif | 770 #endif |
| 765 | 771 |
| 766 // Android doesn't use the plugins pages. | 772 // Android doesn't use the plugins pages. |
| 767 if (page_url.host() == chrome::kChromeUIPluginsHost) | 773 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 768 return PluginsUI::GetFaviconResourceBytes(scale_factor); | 774 return PluginsUI::GetFaviconResourceBytes(scale_factor); |
| 769 | 775 |
| 770 #endif | 776 #endif |
| 771 | 777 |
| 772 return NULL; | 778 return NULL; |
| 773 } | 779 } |
| OLD | NEW |