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

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: Moar review fixes. 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>;
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 503
499 // chrome://inspect isn't supported on Android nor iOS. Page debugging is 504 // chrome://inspect isn't supported on Android nor iOS. Page debugging is
500 // handled by a remote devtools on the host machine, and other elements, i.e. 505 // handled by a remote devtools on the host machine, and other elements, i.e.
501 // extensions aren't supported. 506 // extensions aren't supported.
502 if (url.host() == chrome::kChromeUIInspectHost) 507 if (url.host() == chrome::kChromeUIInspectHost)
503 return &NewWebUI<InspectUI>; 508 return &NewWebUI<InspectUI>;
504 #endif 509 #endif
505 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) 510 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
506 if (url.host() == chrome::kChromeUIChromeSigninHost) 511 if (url.host() == chrome::kChromeUIChromeSigninHost)
507 return &NewWebUI<InlineLoginUI>; 512 return &NewWebUI<InlineLoginUI>;
508 if (url.host() == chrome::kChromeUIUserManagerHost) 513 if (url.host() == chrome::kChromeUIUserManagerHost)
Dan Beam 2016/06/07 00:25:08 should this also be checking whether MD settings i
groby-ooo-7-16 2016/06/07 00:27:39 No, because we'd never get that host in the first
Dan Beam 2016/06/07 00:32:36 yeah, maybe this is where the check should go inst
groby-ooo-7-16 2016/06/08 00:22:41 You'd have to ask the user manager team :) I'd li
Dan Beam 2016/06/08 00:24:25 +mahmadi
509 return &NewWebUI<UserManagerUI>; 514 return &NewWebUI<UserManagerUI>;
510 if (url.host() == chrome::kChromeUIMdUserManagerHost) 515 if (url.host() == chrome::kChromeUIMdUserManagerHost)
511 return &NewWebUI<MDUserManagerUI>; 516 return &NewWebUI<MDUserManagerUI>;
512 if (url.host() == chrome::kChromeUISyncConfirmationHost) 517 if (url.host() == chrome::kChromeUISyncConfirmationHost)
513 return &NewWebUI<SyncConfirmationUI>; 518 return &NewWebUI<SyncConfirmationUI>;
514 if (url.host() == chrome::kChromeUIProfileSigninConfirmationHost) 519 if (url.host() == chrome::kChromeUIProfileSigninConfirmationHost)
515 return &NewWebUI<ProfileSigninConfirmationUI>; 520 return &NewWebUI<ProfileSigninConfirmationUI>;
516 #endif 521 #endif
517 522
518 /**************************************************************************** 523 /****************************************************************************
(...skipping 269 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