Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Side by Side Diff: content/browser/webui/content_web_ui_controller_factory.cc

Issue 2517953003: Move enable_webrtc to a buildflag header. (Closed)
Patch Set: Fix Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/webrtc/webrtc_internals.cc ('k') | content/common/content_message_generator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/browser/webui/content_web_ui_controller_factory.h" 5 #include "content/browser/webui/content_web_ui_controller_factory.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "content/browser/accessibility/accessibility_ui.h" 8 #include "content/browser/accessibility/accessibility_ui.h"
9 #include "content/browser/appcache/appcache_internals_ui.h" 9 #include "content/browser/appcache/appcache_internals_ui.h"
10 #include "content/browser/gpu/gpu_internals_ui.h" 10 #include "content/browser/gpu/gpu_internals_ui.h"
11 #include "content/browser/indexed_db/indexed_db_internals_ui.h" 11 #include "content/browser/indexed_db/indexed_db_internals_ui.h"
12 #include "content/browser/media/media_internals_ui.h" 12 #include "content/browser/media/media_internals_ui.h"
13 #include "content/browser/net/network_errors_listing_ui.h" 13 #include "content/browser/net/network_errors_listing_ui.h"
14 #include "content/browser/service_worker/service_worker_internals_ui.h" 14 #include "content/browser/service_worker/service_worker_internals_ui.h"
15 #include "content/browser/tracing/tracing_ui.h" 15 #include "content/browser/tracing/tracing_ui.h"
16 #include "content/public/browser/storage_partition.h" 16 #include "content/public/browser/storage_partition.h"
17 #include "content/public/browser/web_contents.h" 17 #include "content/public/browser/web_contents.h"
18 #include "content/public/browser/web_ui.h" 18 #include "content/public/browser/web_ui.h"
19 #include "content/public/common/url_constants.h" 19 #include "content/public/common/url_constants.h"
20 #include "media/media_features.h"
20 21
21 #if defined(ENABLE_WEBRTC) 22 #if BUILDFLAG(ENABLE_WEBRTC)
22 #include "content/browser/webrtc/webrtc_internals_ui.h" 23 #include "content/browser/webrtc/webrtc_internals_ui.h"
23 #endif 24 #endif
24 25
25 namespace content { 26 namespace content {
26 27
27 WebUI::TypeID ContentWebUIControllerFactory::GetWebUIType( 28 WebUI::TypeID ContentWebUIControllerFactory::GetWebUIType(
28 BrowserContext* browser_context, const GURL& url) const { 29 BrowserContext* browser_context, const GURL& url) const {
29 if (!url.SchemeIs(kChromeUIScheme)) 30 if (!url.SchemeIs(kChromeUIScheme))
30 return WebUI::kNoWebUI; 31 return WebUI::kNoWebUI;
31 32
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 return new AccessibilityUI(web_ui); 73 return new AccessibilityUI(web_ui);
73 if (url.host_piece() == kChromeUIServiceWorkerInternalsHost) 74 if (url.host_piece() == kChromeUIServiceWorkerInternalsHost)
74 return new ServiceWorkerInternalsUI(web_ui); 75 return new ServiceWorkerInternalsUI(web_ui);
75 if (url.host_piece() == kChromeUINetworkErrorsListingHost) 76 if (url.host_piece() == kChromeUINetworkErrorsListingHost)
76 return new NetworkErrorsListingUI(web_ui); 77 return new NetworkErrorsListingUI(web_ui);
77 #if !defined(OS_ANDROID) 78 #if !defined(OS_ANDROID)
78 if (url.host_piece() == kChromeUITracingHost) 79 if (url.host_piece() == kChromeUITracingHost)
79 return new TracingUI(web_ui); 80 return new TracingUI(web_ui);
80 #endif 81 #endif
81 82
82 #if defined(ENABLE_WEBRTC) 83 #if BUILDFLAG(ENABLE_WEBRTC)
83 if (url.host_piece() == kChromeUIWebRTCInternalsHost) 84 if (url.host_piece() == kChromeUIWebRTCInternalsHost)
84 return new WebRTCInternalsUI(web_ui); 85 return new WebRTCInternalsUI(web_ui);
85 #endif 86 #endif
86 87
87 return nullptr; 88 return nullptr;
88 } 89 }
89 90
90 // static 91 // static
91 ContentWebUIControllerFactory* ContentWebUIControllerFactory::GetInstance() { 92 ContentWebUIControllerFactory* ContentWebUIControllerFactory::GetInstance() {
92 return base::Singleton<ContentWebUIControllerFactory>::get(); 93 return base::Singleton<ContentWebUIControllerFactory>::get();
93 } 94 }
94 95
95 ContentWebUIControllerFactory::ContentWebUIControllerFactory() { 96 ContentWebUIControllerFactory::ContentWebUIControllerFactory() {
96 } 97 }
97 98
98 ContentWebUIControllerFactory::~ContentWebUIControllerFactory() { 99 ContentWebUIControllerFactory::~ContentWebUIControllerFactory() {
99 } 100 }
100 101
101 } // namespace content 102 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/webrtc/webrtc_internals.cc ('k') | content/common/content_message_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698