| 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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 return &NewWebUI<NewTabUI>; | 406 return &NewWebUI<NewTabUI>; |
| 407 if (url.host() == chrome::kChromeUIMdSettingsHost) | 407 if (url.host() == chrome::kChromeUIMdSettingsHost) |
| 408 return &NewWebUI<settings::MdSettingsUI>; | 408 return &NewWebUI<settings::MdSettingsUI>; |
| 409 // If the material design extensions page is enabled, it gets its own host. | 409 // If the material design extensions page is enabled, it gets its own host. |
| 410 // Otherwise, it's handled by the uber settings page. | 410 // Otherwise, it's handled by the uber settings page. |
| 411 if (url.host() == chrome::kChromeUIExtensionsHost && | 411 if (url.host() == chrome::kChromeUIExtensionsHost && |
| 412 ::switches::MdExtensionsEnabled()) { | 412 ::switches::MdExtensionsEnabled()) { |
| 413 return &NewWebUI<extensions::ExtensionsUI>; | 413 return &NewWebUI<extensions::ExtensionsUI>; |
| 414 } | 414 } |
| 415 // Material Design history is on its own host, rather than on an Uber page. | 415 // Material Design history is on its own host, rather than on an Uber page. |
| 416 if (base::FeatureList::IsEnabled(features::kMaterialDesignHistoryFeature) && | 416 if (MdHistoryUI::IsEnabled(profile) && |
| 417 url.host() == chrome::kChromeUIHistoryHost) { | 417 url.host() == chrome::kChromeUIHistoryHost) { |
| 418 return &NewWebUI<MdHistoryUI>; | 418 return &NewWebUI<MdHistoryUI>; |
| 419 } | 419 } |
| 420 if (url.host() == chrome::kChromeUIQuotaInternalsHost) | 420 if (url.host() == chrome::kChromeUIQuotaInternalsHost) |
| 421 return &NewWebUI<QuotaInternalsUI>; | 421 return &NewWebUI<QuotaInternalsUI>; |
| 422 // Settings are implemented with native UI elements on Android. | 422 // Settings are implemented with native UI elements on Android. |
| 423 // Handle chrome://settings if settings in a window and about in settings | 423 // Handle chrome://settings if settings in a window and about in settings |
| 424 // are enabled. | 424 // are enabled. |
| 425 if (url.host() == chrome::kChromeUISettingsFrameHost || | 425 if (url.host() == chrome::kChromeUISettingsFrameHost || |
| 426 (url.host() == chrome::kChromeUISettingsHost && | 426 (url.host() == chrome::kChromeUISettingsHost && |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 795 #endif | 795 #endif |
| 796 | 796 |
| 797 // Android doesn't use the plugins pages. | 797 // Android doesn't use the plugins pages. |
| 798 if (page_url.host() == chrome::kChromeUIPluginsHost) | 798 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 799 return PluginsUI::GetFaviconResourceBytes(scale_factor); | 799 return PluginsUI::GetFaviconResourceBytes(scale_factor); |
| 800 | 800 |
| 801 #endif | 801 #endif |
| 802 | 802 |
| 803 return NULL; | 803 return NULL; |
| 804 } | 804 } |
| OLD | NEW |