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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 #include "components/favicon_base/favicon_util.h" | 72 #include "components/favicon_base/favicon_util.h" |
73 #include "components/favicon_base/select_favicon_frames.h" | 73 #include "components/favicon_base/select_favicon_frames.h" |
74 #include "components/history/core/browser/history_types.h" | 74 #include "components/history/core/browser/history_types.h" |
75 #include "components/prefs/pref_service.h" | 75 #include "components/prefs/pref_service.h" |
76 #include "components/signin/core/common/profile_management_switches.h" | 76 #include "components/signin/core/common/profile_management_switches.h" |
77 #include "content/public/browser/web_contents.h" | 77 #include "content/public/browser/web_contents.h" |
78 #include "content/public/browser/web_ui.h" | 78 #include "content/public/browser/web_ui.h" |
79 #include "content/public/common/content_client.h" | 79 #include "content/public/common/content_client.h" |
80 #include "content/public/common/url_utils.h" | 80 #include "content/public/common/url_utils.h" |
81 #include "extensions/features/features.h" | 81 #include "extensions/features/features.h" |
| 82 #include "media/media_features.h" |
82 #include "ppapi/features/features.h" | 83 #include "ppapi/features/features.h" |
83 #include "printing/features/features.h" | 84 #include "printing/features/features.h" |
84 #include "ui/gfx/favicon_size.h" | 85 #include "ui/gfx/favicon_size.h" |
85 #include "ui/web_dialogs/web_dialog_ui.h" | 86 #include "ui/web_dialogs/web_dialog_ui.h" |
86 #include "url/gurl.h" | 87 #include "url/gurl.h" |
87 | 88 |
88 #if !defined(DISABLE_NACL) | 89 #if !defined(DISABLE_NACL) |
89 #include "chrome/browser/ui/webui/nacl_ui.h" | 90 #include "chrome/browser/ui/webui/nacl_ui.h" |
90 #endif | 91 #endif |
91 | 92 |
92 #if defined(ENABLE_WEBRTC) | 93 #if BUILDFLAG(ENABLE_WEBRTC) |
93 #include "chrome/browser/ui/webui/media/webrtc_logs_ui.h" | 94 #include "chrome/browser/ui/webui/media/webrtc_logs_ui.h" |
94 #endif | 95 #endif |
95 | 96 |
96 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) | 97 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
97 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" | 98 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" |
98 #endif | 99 #endif |
99 | 100 |
100 #if defined(ENABLE_MEDIA_ROUTER) | 101 #if defined(ENABLE_MEDIA_ROUTER) |
101 #if !defined(OS_ANDROID) | 102 #if !defined(OS_ANDROID) |
102 #include "chrome/browser/media/router/media_router_feature.h" | 103 #include "chrome/browser/media/router/media_router_feature.h" |
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 if (url.host_piece() == chrome::kChromeUIPrintHost && | 593 if (url.host_piece() == chrome::kChromeUIPrintHost && |
593 !profile->GetPrefs()->GetBoolean(prefs::kPrintPreviewDisabled)) { | 594 !profile->GetPrefs()->GetBoolean(prefs::kPrintPreviewDisabled)) { |
594 return &NewWebUI<PrintPreviewUI>; | 595 return &NewWebUI<PrintPreviewUI>; |
595 } | 596 } |
596 #endif | 597 #endif |
597 #if BUILDFLAG(ENABLE_SERVICE_DISCOVERY) | 598 #if BUILDFLAG(ENABLE_SERVICE_DISCOVERY) |
598 if (url.host_piece() == chrome::kChromeUIDevicesHost) { | 599 if (url.host_piece() == chrome::kChromeUIDevicesHost) { |
599 return &NewWebUI<LocalDiscoveryUI>; | 600 return &NewWebUI<LocalDiscoveryUI>; |
600 } | 601 } |
601 #endif | 602 #endif |
602 #if defined(ENABLE_WEBRTC) | 603 #if BUILDFLAG(ENABLE_WEBRTC) |
603 if (url.host_piece() == chrome::kChromeUIWebRtcLogsHost) | 604 if (url.host_piece() == chrome::kChromeUIWebRtcLogsHost) |
604 return &NewWebUI<WebRtcLogsUI>; | 605 return &NewWebUI<WebRtcLogsUI>; |
605 #endif | 606 #endif |
606 #if defined(ENABLE_MEDIA_ROUTER) | 607 #if defined(ENABLE_MEDIA_ROUTER) |
607 #if !defined(OS_ANDROID) | 608 #if !defined(OS_ANDROID) |
608 if (url.host_piece() == chrome::kChromeUIMediaRouterHost && | 609 if (url.host_piece() == chrome::kChromeUIMediaRouterHost && |
609 media_router::MediaRouterEnabled(profile)) { | 610 media_router::MediaRouterEnabled(profile)) { |
610 return &NewWebUI<media_router::MediaRouterUI>; | 611 return &NewWebUI<media_router::MediaRouterUI>; |
611 } | 612 } |
612 #endif | 613 #endif |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
814 #endif | 815 #endif |
815 | 816 |
816 // Android doesn't use the plugins pages. | 817 // Android doesn't use the plugins pages. |
817 if (page_url.host_piece() == chrome::kChromeUIPluginsHost) | 818 if (page_url.host_piece() == chrome::kChromeUIPluginsHost) |
818 return PluginsUI::GetFaviconResourceBytes(scale_factor); | 819 return PluginsUI::GetFaviconResourceBytes(scale_factor); |
819 | 820 |
820 #endif | 821 #endif |
821 | 822 |
822 return NULL; | 823 return NULL; |
823 } | 824 } |
OLD | NEW |