Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(826)

Side by Side Diff: chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc

Issue 2029263002: [MD Settings] Add feature to enable md-settings by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 (base::FeatureList::IsEnabled(features::kMaterialDesignHistoryFeature) &&
410 url.host() == chrome::kChromeUIHistoryHost) { 410 url.host() == chrome::kChromeUIHistoryHost) {
411 return &NewWebUI<MdHistoryUI>; 411 return &NewWebUI<MdHistoryUI>;
412 } 412 }
413 // Material Design Settings gets its own host, if enabled.
414 if (base::FeatureList::IsEnabled(features::kMaterialDesignSettingsFeature) &&
415 url.host() == chrome::kChromeUISettingsHost) {
416 return &NewWebUI<settings::MdSettingsUI>;
Dan Beam 2016/06/01 20:59:49 i think it'd make sense to do one of two things he
groby-ooo-7-16 2016/06/01 23:29:35 I'm following the established pattern - all materi
Dan Beam 2016/06/01 23:38:32 ah, i see: UberUI creates it's own WebUIs for the
417 }
413 if (url.host() == chrome::kChromeUIQuotaInternalsHost) 418 if (url.host() == chrome::kChromeUIQuotaInternalsHost)
414 return &NewWebUI<QuotaInternalsUI>; 419 return &NewWebUI<QuotaInternalsUI>;
415 // Settings are implemented with native UI elements on Android. 420 // Settings are implemented with native UI elements on Android.
416 // Handle chrome://settings if settings in a window and about in settings 421 // Handle chrome://settings if settings in a window and about in settings
417 // are enabled. 422 // are enabled.
418 if (url.host() == chrome::kChromeUISettingsFrameHost || 423 if (url.host() == chrome::kChromeUISettingsFrameHost ||
419 (url.host() == chrome::kChromeUISettingsHost && 424 (url.host() == chrome::kChromeUISettingsHost &&
420 ::switches::AboutInSettingsEnabled())) { 425 ::switches::AboutInSettingsEnabled())) {
421 return &NewWebUI<options::OptionsUI>; 426 return &NewWebUI<options::OptionsUI>;
422 } 427 }
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 #endif 793 #endif
789 794
790 // Android doesn't use the plugins pages. 795 // Android doesn't use the plugins pages.
791 if (page_url.host() == chrome::kChromeUIPluginsHost) 796 if (page_url.host() == chrome::kChromeUIPluginsHost)
792 return PluginsUI::GetFaviconResourceBytes(scale_factor); 797 return PluginsUI::GetFaviconResourceBytes(scale_factor);
793 798
794 #endif 799 #endif
795 800
796 return NULL; 801 return NULL;
797 } 802 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698