| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 // Otherwise, it's handled by the uber settings page. | 412 // Otherwise, it's handled by the uber settings page. |
| 413 if (url.host() == chrome::kChromeUIExtensionsHost && | 413 if (url.host() == chrome::kChromeUIExtensionsHost && |
| 414 ::switches::MdExtensionsEnabled()) { | 414 ::switches::MdExtensionsEnabled()) { |
| 415 return &NewWebUI<extensions::ExtensionsUI>; | 415 return &NewWebUI<extensions::ExtensionsUI>; |
| 416 } | 416 } |
| 417 // Material Design history is on its own host, rather than on an Uber page. | 417 // Material Design history is on its own host, rather than on an Uber page. |
| 418 if (MdHistoryUI::IsEnabled(profile) && | 418 if (MdHistoryUI::IsEnabled(profile) && |
| 419 url.host() == chrome::kChromeUIHistoryHost) { | 419 url.host() == chrome::kChromeUIHistoryHost) { |
| 420 return &NewWebUI<MdHistoryUI>; | 420 return &NewWebUI<MdHistoryUI>; |
| 421 } | 421 } |
| 422 // Material Design Settings gets its own host, if enabled. |
| 423 if (base::FeatureList::IsEnabled(features::kMaterialDesignSettingsFeature) && |
| 424 url.host() == chrome::kChromeUISettingsHost) { |
| 425 return &NewWebUI<settings::MdSettingsUI>; |
| 426 } |
| 422 if (url.host() == chrome::kChromeUIQuotaInternalsHost) | 427 if (url.host() == chrome::kChromeUIQuotaInternalsHost) |
| 423 return &NewWebUI<QuotaInternalsUI>; | 428 return &NewWebUI<QuotaInternalsUI>; |
| 424 // Settings are implemented with native UI elements on Android. | 429 // Settings are implemented with native UI elements on Android. |
| 425 // Handle chrome://settings if settings in a window and about in settings | 430 // Handle chrome://settings if settings in a window and about in settings |
| 426 // are enabled. | 431 // are enabled. |
| 427 if (url.host() == chrome::kChromeUISettingsFrameHost || | 432 if (url.host() == chrome::kChromeUISettingsFrameHost || |
| 428 (url.host() == chrome::kChromeUISettingsHost && | 433 (url.host() == chrome::kChromeUISettingsHost && |
| 429 ::switches::AboutInSettingsEnabled())) { | 434 ::switches::AboutInSettingsEnabled())) { |
| 430 return &NewWebUI<options::OptionsUI>; | 435 return &NewWebUI<options::OptionsUI>; |
| 431 } | 436 } |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 #endif | 807 #endif |
| 803 | 808 |
| 804 // Android doesn't use the plugins pages. | 809 // Android doesn't use the plugins pages. |
| 805 if (page_url.host() == chrome::kChromeUIPluginsHost) | 810 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 806 return PluginsUI::GetFaviconResourceBytes(scale_factor); | 811 return PluginsUI::GetFaviconResourceBytes(scale_factor); |
| 807 | 812 |
| 808 #endif | 813 #endif |
| 809 | 814 |
| 810 return NULL; | 815 return NULL; |
| 811 } | 816 } |
| OLD | NEW |