Chromium Code Reviews| 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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 Loading... | |
| 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 Loading... | |
| 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 } |
| OLD | NEW |