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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 #include "chrome/browser/ui/webui/profiler_ui.h" | 46 #include "chrome/browser/ui/webui/profiler_ui.h" |
47 #include "chrome/browser/ui/webui/settings/md_settings_ui.h" | 47 #include "chrome/browser/ui/webui/settings/md_settings_ui.h" |
48 #include "chrome/browser/ui/webui/signin/md_user_manager_ui.h" | 48 #include "chrome/browser/ui/webui/signin/md_user_manager_ui.h" |
49 #include "chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.h" | 49 #include "chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.h" |
50 #include "chrome/browser/ui/webui/signin_internals_ui.h" | 50 #include "chrome/browser/ui/webui/signin_internals_ui.h" |
51 #include "chrome/browser/ui/webui/supervised_user_internals_ui.h" | 51 #include "chrome/browser/ui/webui/supervised_user_internals_ui.h" |
52 #include "chrome/browser/ui/webui/sync_internals_ui.h" | 52 #include "chrome/browser/ui/webui/sync_internals_ui.h" |
53 #include "chrome/browser/ui/webui/translate_internals/translate_internals_ui.h" | 53 #include "chrome/browser/ui/webui/translate_internals/translate_internals_ui.h" |
54 #include "chrome/browser/ui/webui/user_actions/user_actions_ui.h" | 54 #include "chrome/browser/ui/webui/user_actions/user_actions_ui.h" |
55 #include "chrome/browser/ui/webui/version_ui.h" | 55 #include "chrome/browser/ui/webui/version_ui.h" |
| 56 #include "chrome/common/chrome_features.h" |
56 #include "chrome/common/chrome_switches.h" | 57 #include "chrome/common/chrome_switches.h" |
57 #include "chrome/common/pref_names.h" | 58 #include "chrome/common/pref_names.h" |
58 #include "chrome/common/url_constants.h" | 59 #include "chrome/common/url_constants.h" |
59 #include "components/dom_distiller/core/dom_distiller_constants.h" | 60 #include "components/dom_distiller/core/dom_distiller_constants.h" |
60 #include "components/dom_distiller/core/dom_distiller_features.h" | 61 #include "components/dom_distiller/core/dom_distiller_features.h" |
61 #include "components/dom_distiller/core/dom_distiller_service.h" | 62 #include "components/dom_distiller/core/dom_distiller_service.h" |
62 #include "components/dom_distiller/core/url_constants.h" | 63 #include "components/dom_distiller/core/url_constants.h" |
63 #include "components/dom_distiller/webui/dom_distiller_ui.h" | 64 #include "components/dom_distiller/webui/dom_distiller_ui.h" |
64 #include "components/favicon/core/favicon_service.h" | 65 #include "components/favicon/core/favicon_service.h" |
65 #include "components/favicon_base/favicon_util.h" | 66 #include "components/favicon_base/favicon_util.h" |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 return &NewWebUI<NewTabUI>; | 397 return &NewWebUI<NewTabUI>; |
397 if (url.host() == chrome::kChromeUIMdSettingsHost) | 398 if (url.host() == chrome::kChromeUIMdSettingsHost) |
398 return &NewWebUI<settings::MdSettingsUI>; | 399 return &NewWebUI<settings::MdSettingsUI>; |
399 // If the material design extensions page is enabled, it gets its own host. | 400 // If the material design extensions page is enabled, it gets its own host. |
400 // Otherwise, it's handled by the uber settings page. | 401 // Otherwise, it's handled by the uber settings page. |
401 if (url.host() == chrome::kChromeUIExtensionsHost && | 402 if (url.host() == chrome::kChromeUIExtensionsHost && |
402 ::switches::MdExtensionsEnabled()) { | 403 ::switches::MdExtensionsEnabled()) { |
403 return &NewWebUI<extensions::ExtensionsUI>; | 404 return &NewWebUI<extensions::ExtensionsUI>; |
404 } | 405 } |
405 // Material Design history is on its own host, rather than on an Uber page. | 406 // Material Design history is on its own host, rather than on an Uber page. |
406 if (::switches::MdHistoryEnabled() && | 407 if (base::FeatureList::IsEnabled(features::kMaterialDesignHistoryFeature) && |
407 url.host() == chrome::kChromeUIHistoryHost) { | 408 url.host() == chrome::kChromeUIHistoryHost) { |
408 return &NewWebUI<MdHistoryUI>; | 409 return &NewWebUI<MdHistoryUI>; |
409 } | 410 } |
410 if (url.host() == chrome::kChromeUIQuotaInternalsHost) | 411 if (url.host() == chrome::kChromeUIQuotaInternalsHost) |
411 return &NewWebUI<QuotaInternalsUI>; | 412 return &NewWebUI<QuotaInternalsUI>; |
412 // Settings are implemented with native UI elements on Android. | 413 // Settings are implemented with native UI elements on Android. |
413 // Handle chrome://settings if settings in a window and about in settings | 414 // Handle chrome://settings if settings in a window and about in settings |
414 // are enabled. | 415 // are enabled. |
415 if (url.host() == chrome::kChromeUISettingsFrameHost || | 416 if (url.host() == chrome::kChromeUISettingsFrameHost || |
416 (url.host() == chrome::kChromeUISettingsHost && | 417 (url.host() == chrome::kChromeUISettingsHost && |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
776 #endif | 777 #endif |
777 | 778 |
778 // Android doesn't use the plugins pages. | 779 // Android doesn't use the plugins pages. |
779 if (page_url.host() == chrome::kChromeUIPluginsHost) | 780 if (page_url.host() == chrome::kChromeUIPluginsHost) |
780 return PluginsUI::GetFaviconResourceBytes(scale_factor); | 781 return PluginsUI::GetFaviconResourceBytes(scale_factor); |
781 | 782 |
782 #endif | 783 #endif |
783 | 784 |
784 return NULL; | 785 return NULL; |
785 } | 786 } |
OLD | NEW |