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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 #endif | 96 #endif |
97 | 97 |
98 #if BUILDFLAG(ENABLE_WEBRTC) | 98 #if BUILDFLAG(ENABLE_WEBRTC) |
99 #include "chrome/browser/ui/webui/media/webrtc_logs_ui.h" | 99 #include "chrome/browser/ui/webui/media/webrtc_logs_ui.h" |
100 #endif | 100 #endif |
101 | 101 |
102 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) | 102 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
103 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" | 103 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" |
104 #endif | 104 #endif |
105 | 105 |
106 #if defined(ENABLE_MEDIA_ROUTER) | |
107 #if !defined(OS_ANDROID) | 106 #if !defined(OS_ANDROID) |
108 #include "chrome/browser/media/router/media_router_feature.h" | 107 #include "chrome/browser/media/router/media_router_feature.h" |
109 #include "chrome/browser/ui/webui/media_router/media_router_ui.h" | 108 #include "chrome/browser/ui/webui/media_router/media_router_ui.h" |
110 #endif | 109 #endif |
111 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) | 110 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) |
112 #include "chrome/browser/ui/webui/cast/cast_ui.h" | 111 #include "chrome/browser/ui/webui/cast/cast_ui.h" |
113 #endif | 112 #endif |
114 #endif | |
115 | 113 |
116 #if defined(OS_ANDROID) | 114 #if defined(OS_ANDROID) |
117 #include "chrome/browser/ui/webui/offline/offline_internals_ui.h" | 115 #include "chrome/browser/ui/webui/offline/offline_internals_ui.h" |
118 #include "chrome/browser/ui/webui/popular_sites_internals_ui.h" | 116 #include "chrome/browser/ui/webui/popular_sites_internals_ui.h" |
119 #include "chrome/browser/ui/webui/snippets_internals_ui.h" | 117 #include "chrome/browser/ui/webui/snippets_internals_ui.h" |
120 #include "chrome/browser/ui/webui/webapks_ui.h" | 118 #include "chrome/browser/ui/webui/webapks_ui.h" |
121 #if BUILDFLAG(ENABLE_WEBVR) | 119 #if BUILDFLAG(ENABLE_WEBVR) |
122 #include "chrome/browser/ui/webui/vr_shell/vr_shell_ui_ui.h" | 120 #include "chrome/browser/ui/webui/vr_shell/vr_shell_ui_ui.h" |
123 #endif | 121 #endif |
124 #else | 122 #else |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 #endif | 608 #endif |
611 #if BUILDFLAG(ENABLE_SERVICE_DISCOVERY) | 609 #if BUILDFLAG(ENABLE_SERVICE_DISCOVERY) |
612 if (url.host_piece() == chrome::kChromeUIDevicesHost) { | 610 if (url.host_piece() == chrome::kChromeUIDevicesHost) { |
613 return &NewWebUI<LocalDiscoveryUI>; | 611 return &NewWebUI<LocalDiscoveryUI>; |
614 } | 612 } |
615 #endif | 613 #endif |
616 #if BUILDFLAG(ENABLE_WEBRTC) | 614 #if BUILDFLAG(ENABLE_WEBRTC) |
617 if (url.host_piece() == chrome::kChromeUIWebRtcLogsHost) | 615 if (url.host_piece() == chrome::kChromeUIWebRtcLogsHost) |
618 return &NewWebUI<WebRtcLogsUI>; | 616 return &NewWebUI<WebRtcLogsUI>; |
619 #endif | 617 #endif |
620 #if defined(ENABLE_MEDIA_ROUTER) | |
621 #if !defined(OS_ANDROID) | 618 #if !defined(OS_ANDROID) |
622 if (url.host_piece() == chrome::kChromeUIMediaRouterHost && | 619 if (url.host_piece() == chrome::kChromeUIMediaRouterHost && |
623 media_router::MediaRouterEnabled(profile)) { | 620 media_router::MediaRouterEnabled(profile)) { |
624 return &NewWebUI<media_router::MediaRouterUI>; | 621 return &NewWebUI<media_router::MediaRouterUI>; |
625 } | 622 } |
626 #endif | 623 #endif |
627 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) | 624 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) |
628 if (url.host_piece() == chrome::kChromeUICastHost && | 625 if (url.host_piece() == chrome::kChromeUICastHost && |
629 media_router::MediaRouterEnabled(profile)) { | 626 media_router::MediaRouterEnabled(profile)) { |
630 return &NewWebUI<CastUI>; | 627 return &NewWebUI<CastUI>; |
631 } | 628 } |
632 #endif | 629 #endif |
633 #endif | |
634 if (IsAboutUI(url)) | 630 if (IsAboutUI(url)) |
635 return &NewWebUI<AboutUI>; | 631 return &NewWebUI<AboutUI>; |
636 | 632 |
637 if (dom_distiller::IsEnableDomDistillerSet() && | 633 if (dom_distiller::IsEnableDomDistillerSet() && |
638 url.host_piece() == dom_distiller::kChromeUIDomDistillerHost) { | 634 url.host_piece() == dom_distiller::kChromeUIDomDistillerHost) { |
639 return &NewWebUI<dom_distiller::DomDistillerUi>; | 635 return &NewWebUI<dom_distiller::DomDistillerUi>; |
640 } | 636 } |
641 | 637 |
642 if (SiteEngagementService::IsEnabled() && | 638 if (SiteEngagementService::IsEnabled() && |
643 url.host_piece() == chrome::kChromeUISiteEngagementHost) { | 639 url.host_piece() == chrome::kChromeUISiteEngagementHost) { |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
823 | 819 |
824 #if BUILDFLAG(ENABLE_EXTENSIONS) | 820 #if BUILDFLAG(ENABLE_EXTENSIONS) |
825 if (page_url.host_piece() == chrome::kChromeUIExtensionsHost || | 821 if (page_url.host_piece() == chrome::kChromeUIExtensionsHost || |
826 page_url.host_piece() == chrome::kChromeUIExtensionsFrameHost) | 822 page_url.host_piece() == chrome::kChromeUIExtensionsFrameHost) |
827 return extensions::ExtensionsUI::GetFaviconResourceBytes(scale_factor); | 823 return extensions::ExtensionsUI::GetFaviconResourceBytes(scale_factor); |
828 #endif // BUILDFLAG(ENABLE_EXTENSIONS) | 824 #endif // BUILDFLAG(ENABLE_EXTENSIONS) |
829 #endif // !defined(OS_ANDROID) | 825 #endif // !defined(OS_ANDROID) |
830 | 826 |
831 return NULL; | 827 return NULL; |
832 } | 828 } |
OLD | NEW |