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