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 27 matching lines...) Expand all Loading... |
38 #include "chrome/browser/ui/webui/invalidations_ui.h" | 38 #include "chrome/browser/ui/webui/invalidations_ui.h" |
39 #include "chrome/browser/ui/webui/local_state/local_state_ui.h" | 39 #include "chrome/browser/ui/webui/local_state/local_state_ui.h" |
40 #include "chrome/browser/ui/webui/log_web_ui_url.h" | 40 #include "chrome/browser/ui/webui/log_web_ui_url.h" |
41 #include "chrome/browser/ui/webui/net_export_ui.h" | 41 #include "chrome/browser/ui/webui/net_export_ui.h" |
42 #include "chrome/browser/ui/webui/net_internals/net_internals_ui.h" | 42 #include "chrome/browser/ui/webui/net_internals/net_internals_ui.h" |
43 #include "chrome/browser/ui/webui/ntp_tiles_internals_ui.h" | 43 #include "chrome/browser/ui/webui/ntp_tiles_internals_ui.h" |
44 #include "chrome/browser/ui/webui/omnibox/omnibox_ui.h" | 44 #include "chrome/browser/ui/webui/omnibox/omnibox_ui.h" |
45 #include "chrome/browser/ui/webui/options/options_ui.h" | 45 #include "chrome/browser/ui/webui/options/options_ui.h" |
46 #include "chrome/browser/ui/webui/password_manager_internals/password_manager_in
ternals_ui.h" | 46 #include "chrome/browser/ui/webui/password_manager_internals/password_manager_in
ternals_ui.h" |
47 #include "chrome/browser/ui/webui/physical_web/physical_web_ui.h" | 47 #include "chrome/browser/ui/webui/physical_web/physical_web_ui.h" |
48 #include "chrome/browser/ui/webui/plugins/plugins_ui.h" | |
49 #include "chrome/browser/ui/webui/policy_material_design_ui.h" | 48 #include "chrome/browser/ui/webui/policy_material_design_ui.h" |
50 #include "chrome/browser/ui/webui/policy_ui.h" | 49 #include "chrome/browser/ui/webui/policy_ui.h" |
51 #include "chrome/browser/ui/webui/predictors/predictors_ui.h" | 50 #include "chrome/browser/ui/webui/predictors/predictors_ui.h" |
52 #include "chrome/browser/ui/webui/profiler_ui.h" | 51 #include "chrome/browser/ui/webui/profiler_ui.h" |
53 #include "chrome/browser/ui/webui/settings/md_settings_ui.h" | 52 #include "chrome/browser/ui/webui/settings/md_settings_ui.h" |
54 #include "chrome/browser/ui/webui/settings_utils.h" | 53 #include "chrome/browser/ui/webui/settings_utils.h" |
55 #include "chrome/browser/ui/webui/signin_internals_ui.h" | 54 #include "chrome/browser/ui/webui/signin_internals_ui.h" |
56 #include "chrome/browser/ui/webui/supervised_user_internals_ui.h" | 55 #include "chrome/browser/ui/webui/supervised_user_internals_ui.h" |
57 #include "chrome/browser/ui/webui/sync_internals_ui.h" | 56 #include "chrome/browser/ui/webui/sync_internals_ui.h" |
58 #include "chrome/browser/ui/webui/task_scheduler_internals/task_scheduler_intern
als_ui.h" | 57 #include "chrome/browser/ui/webui/task_scheduler_internals/task_scheduler_intern
als_ui.h" |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 if (url.host_piece() == chrome::kChromeUIAppListStartPageHost) | 584 if (url.host_piece() == chrome::kChromeUIAppListStartPageHost) |
586 return &NewWebUI<app_list::StartPageUI>; | 585 return &NewWebUI<app_list::StartPageUI>; |
587 #endif | 586 #endif |
588 #if BUILDFLAG(ENABLE_EXTENSIONS) | 587 #if BUILDFLAG(ENABLE_EXTENSIONS) |
589 if (url.host_piece() == chrome::kChromeUIExtensionsFrameHost) | 588 if (url.host_piece() == chrome::kChromeUIExtensionsFrameHost) |
590 return &NewWebUI<extensions::ExtensionsUI>; | 589 return &NewWebUI<extensions::ExtensionsUI>; |
591 #endif | 590 #endif |
592 #if BUILDFLAG(ENABLE_PLUGINS) | 591 #if BUILDFLAG(ENABLE_PLUGINS) |
593 if (url.host_piece() == chrome::kChromeUIFlashHost) | 592 if (url.host_piece() == chrome::kChromeUIFlashHost) |
594 return &NewWebUI<FlashUI>; | 593 return &NewWebUI<FlashUI>; |
595 if (url.host_piece() == chrome::kChromeUIPluginsHost) | |
596 return &NewWebUI<PluginsUI>; | |
597 #endif | 594 #endif |
598 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) | 595 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
599 if (url.host_piece() == chrome::kChromeUIPrintHost && | 596 if (url.host_piece() == chrome::kChromeUIPrintHost && |
600 !profile->GetPrefs()->GetBoolean(prefs::kPrintPreviewDisabled)) { | 597 !profile->GetPrefs()->GetBoolean(prefs::kPrintPreviewDisabled)) { |
601 return &NewWebUI<PrintPreviewUI>; | 598 return &NewWebUI<PrintPreviewUI>; |
602 } | 599 } |
603 #endif | 600 #endif |
604 #if BUILDFLAG(ENABLE_SERVICE_DISCOVERY) | 601 #if BUILDFLAG(ENABLE_SERVICE_DISCOVERY) |
605 if (url.host_piece() == chrome::kChromeUIDevicesHost) { | 602 if (url.host_piece() == chrome::kChromeUIDevicesHost) { |
606 return &NewWebUI<LocalDiscoveryUI>; | 603 return &NewWebUI<LocalDiscoveryUI>; |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
791 return FlagsUI::GetFaviconResourceBytes(scale_factor); | 788 return FlagsUI::GetFaviconResourceBytes(scale_factor); |
792 | 789 |
793 if (page_url.host_piece() == chrome::kChromeUIHistoryHost) | 790 if (page_url.host_piece() == chrome::kChromeUIHistoryHost) |
794 return HistoryUI::GetFaviconResourceBytes(scale_factor); | 791 return HistoryUI::GetFaviconResourceBytes(scale_factor); |
795 | 792 |
796 #if !defined(OS_ANDROID) | 793 #if !defined(OS_ANDROID) |
797 #if !defined(OS_CHROMEOS) | 794 #if !defined(OS_CHROMEOS) |
798 // The Apps launcher page is not available on android or ChromeOS. | 795 // The Apps launcher page is not available on android or ChromeOS. |
799 if (page_url.host_piece() == chrome::kChromeUIAppLauncherPageHost) | 796 if (page_url.host_piece() == chrome::kChromeUIAppLauncherPageHost) |
800 return AppLauncherPageUI::GetFaviconResourceBytes(scale_factor); | 797 return AppLauncherPageUI::GetFaviconResourceBytes(scale_factor); |
801 #endif | 798 #endif // !defined(OS_CHROMEOS) |
802 | 799 |
803 // Flash is not available on android. | 800 // Flash is not available on android. |
804 if (page_url.host_piece() == chrome::kChromeUIFlashHost) | 801 if (page_url.host_piece() == chrome::kChromeUIFlashHost) |
805 return FlashUI::GetFaviconResourceBytes(scale_factor); | 802 return FlashUI::GetFaviconResourceBytes(scale_factor); |
806 | 803 |
807 // Android uses the native download manager. | 804 // Android uses the native download manager. |
808 if (page_url.host_piece() == chrome::kChromeUIDownloadsHost) | 805 if (page_url.host_piece() == chrome::kChromeUIDownloadsHost) |
809 return MdDownloadsUI::GetFaviconResourceBytes(scale_factor); | 806 return MdDownloadsUI::GetFaviconResourceBytes(scale_factor); |
810 | 807 |
811 // Android doesn't use the Options/Settings pages. | 808 // Android doesn't use the Options/Settings pages. |
812 if (page_url.host_piece() == chrome::kChromeUISettingsHost || | 809 if (page_url.host_piece() == chrome::kChromeUISettingsHost || |
813 page_url.host_piece() == chrome::kChromeUISettingsFrameHost || | 810 page_url.host_piece() == chrome::kChromeUISettingsFrameHost || |
814 page_url.host_piece() == chrome::kChromeUIMdSettingsHost) | 811 page_url.host_piece() == chrome::kChromeUIMdSettingsHost) |
815 return settings_utils::GetFaviconResourceBytes(scale_factor); | 812 return settings_utils::GetFaviconResourceBytes(scale_factor); |
816 | 813 |
817 #if BUILDFLAG(ENABLE_EXTENSIONS) | 814 #if BUILDFLAG(ENABLE_EXTENSIONS) |
818 if (page_url.host_piece() == chrome::kChromeUIExtensionsHost || | 815 if (page_url.host_piece() == chrome::kChromeUIExtensionsHost || |
819 page_url.host_piece() == chrome::kChromeUIExtensionsFrameHost) | 816 page_url.host_piece() == chrome::kChromeUIExtensionsFrameHost) |
820 return extensions::ExtensionsUI::GetFaviconResourceBytes(scale_factor); | 817 return extensions::ExtensionsUI::GetFaviconResourceBytes(scale_factor); |
821 #endif | 818 #endif // BUILDFLAG(ENABLE_EXTENSIONS) |
822 | 819 #endif // !defined(OS_ANDROID) |
823 // Android doesn't use the plugins pages. | |
824 if (page_url.host_piece() == chrome::kChromeUIPluginsHost) | |
825 return PluginsUI::GetFaviconResourceBytes(scale_factor); | |
826 | |
827 #endif | |
828 | 820 |
829 return NULL; | 821 return NULL; |
830 } | 822 } |
OLD | NEW |