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