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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2512563003: Convert enable_plugins to a buildflag header. (Closed)
Patch Set: Merge Created 4 years, 1 month 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 169 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
170 #include "gpu/command_buffer/service/gpu_switches.h" 170 #include "gpu/command_buffer/service/gpu_switches.h"
171 #include "ipc/ipc.mojom.h" 171 #include "ipc/ipc.mojom.h"
172 #include "ipc/ipc_channel.h" 172 #include "ipc/ipc_channel.h"
173 #include "ipc/ipc_channel_mojo.h" 173 #include "ipc/ipc_channel_mojo.h"
174 #include "ipc/ipc_logging.h" 174 #include "ipc/ipc_logging.h"
175 #include "media/base/media_switches.h" 175 #include "media/base/media_switches.h"
176 #include "mojo/edk/embedder/embedder.h" 176 #include "mojo/edk/embedder/embedder.h"
177 #include "mojo/public/cpp/bindings/associated_interface_ptr.h" 177 #include "mojo/public/cpp/bindings/associated_interface_ptr.h"
178 #include "net/url_request/url_request_context_getter.h" 178 #include "net/url_request/url_request_context_getter.h"
179 #include "ppapi/features/features.h"
179 #include "ppapi/shared_impl/ppapi_switches.h" 180 #include "ppapi/shared_impl/ppapi_switches.h"
180 #include "services/service_manager/public/cpp/connection.h" 181 #include "services/service_manager/public/cpp/connection.h"
181 #include "services/service_manager/public/cpp/interface_provider.h" 182 #include "services/service_manager/public/cpp/interface_provider.h"
182 #include "services/service_manager/public/cpp/interface_registry.h" 183 #include "services/service_manager/public/cpp/interface_registry.h"
183 #include "services/service_manager/runner/common/switches.h" 184 #include "services/service_manager/runner/common/switches.h"
184 #include "storage/browser/fileapi/sandbox_file_system_backend.h" 185 #include "storage/browser/fileapi/sandbox_file_system_backend.h"
185 #include "third_party/WebKit/public/public_features.h" 186 #include "third_party/WebKit/public/public_features.h"
186 #include "third_party/skia/include/core/SkBitmap.h" 187 #include "third_party/skia/include/core/SkBitmap.h"
187 #include "ui/base/ui_base_switches.h" 188 #include "ui/base/ui_base_switches.h"
188 #include "ui/display/display_switches.h" 189 #include "ui/display/display_switches.h"
(...skipping 29 matching lines...) Expand all
218 #if defined(OS_POSIX) 219 #if defined(OS_POSIX)
219 #include "content/browser/zygote_host/zygote_communication_linux.h" 220 #include "content/browser/zygote_host/zygote_communication_linux.h"
220 #include "content/browser/zygote_host/zygote_host_impl_linux.h" 221 #include "content/browser/zygote_host/zygote_host_impl_linux.h"
221 #include "content/public/browser/zygote_handle_linux.h" 222 #include "content/public/browser/zygote_handle_linux.h"
222 #endif // defined(OS_POSIX) 223 #endif // defined(OS_POSIX)
223 224
224 #if defined(USE_OZONE) 225 #if defined(USE_OZONE)
225 #include "ui/ozone/public/ozone_switches.h" 226 #include "ui/ozone/public/ozone_switches.h"
226 #endif 227 #endif
227 228
228 #if defined(ENABLE_PLUGINS) 229 #if BUILDFLAG(ENABLE_PLUGINS)
229 #include "content/browser/plugin_service_impl.h" 230 #include "content/browser/plugin_service_impl.h"
230 #endif 231 #endif
231 232
232 #if defined(ENABLE_WEBRTC) 233 #if defined(ENABLE_WEBRTC)
233 #include "content/browser/renderer_host/media/media_stream_track_metrics_host.h" 234 #include "content/browser/renderer_host/media/media_stream_track_metrics_host.h"
234 #include "content/browser/renderer_host/p2p/socket_dispatcher_host.h" 235 #include "content/browser/renderer_host/p2p/socket_dispatcher_host.h"
235 #include "content/browser/webrtc/webrtc_internals.h" 236 #include "content/browser/webrtc/webrtc_internals.h"
236 #include "content/common/media/aec_dump_messages.h" 237 #include "content/common/media/aec_dump_messages.h"
237 #include "content/common/media/media_stream_messages.h" 238 #include "content/common/media/media_stream_messages.h"
238 #endif 239 #endif
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 scoped_refptr<RenderMessageFilter> render_message_filter( 1015 scoped_refptr<RenderMessageFilter> render_message_filter(
1015 new RenderMessageFilter( 1016 new RenderMessageFilter(
1016 GetID(), GetBrowserContext(), request_context.get(), 1017 GetID(), GetBrowserContext(), request_context.get(),
1017 widget_helper_.get(), media_internals, 1018 widget_helper_.get(), media_internals,
1018 storage_partition_impl_->GetDOMStorageContext(), 1019 storage_partition_impl_->GetDOMStorageContext(),
1019 storage_partition_impl_->GetCacheStorageContext())); 1020 storage_partition_impl_->GetCacheStorageContext()));
1020 AddFilter(render_message_filter.get()); 1021 AddFilter(render_message_filter.get());
1021 1022
1022 render_frame_message_filter_ = new RenderFrameMessageFilter( 1023 render_frame_message_filter_ = new RenderFrameMessageFilter(
1023 GetID(), 1024 GetID(),
1024 #if defined(ENABLE_PLUGINS) 1025 #if BUILDFLAG(ENABLE_PLUGINS)
1025 PluginServiceImpl::GetInstance(), 1026 PluginServiceImpl::GetInstance(),
1026 #else 1027 #else
1027 nullptr, 1028 nullptr,
1028 #endif 1029 #endif
1029 GetBrowserContext(), 1030 GetBrowserContext(),
1030 request_context.get(), 1031 request_context.get(),
1031 widget_helper_.get()); 1032 widget_helper_.get());
1032 AddFilter(render_frame_message_filter_.get()); 1033 AddFilter(render_frame_message_filter_.get());
1033 1034
1034 BrowserContext* browser_context = GetBrowserContext(); 1035 BrowserContext* browser_context = GetBrowserContext();
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
1084 1085
1085 #if defined(ENABLE_WEBRTC) 1086 #if defined(ENABLE_WEBRTC)
1086 peer_connection_tracker_host_ = new PeerConnectionTrackerHost( 1087 peer_connection_tracker_host_ = new PeerConnectionTrackerHost(
1087 GetID(), webrtc_eventlog_host_.GetWeakPtr()); 1088 GetID(), webrtc_eventlog_host_.GetWeakPtr());
1088 AddFilter(peer_connection_tracker_host_.get()); 1089 AddFilter(peer_connection_tracker_host_.get());
1089 AddFilter(new MediaStreamDispatcherHost( 1090 AddFilter(new MediaStreamDispatcherHost(
1090 GetID(), browser_context->GetResourceContext()->GetMediaDeviceIDSalt(), 1091 GetID(), browser_context->GetResourceContext()->GetMediaDeviceIDSalt(),
1091 media_stream_manager)); 1092 media_stream_manager));
1092 AddFilter(new MediaStreamTrackMetricsHost()); 1093 AddFilter(new MediaStreamTrackMetricsHost());
1093 #endif 1094 #endif
1094 #if defined(ENABLE_PLUGINS) 1095 #if BUILDFLAG(ENABLE_PLUGINS)
1095 AddFilter(new PepperRendererConnection(GetID())); 1096 AddFilter(new PepperRendererConnection(GetID()));
1096 #endif 1097 #endif
1097 AddFilter(new SpeechRecognitionDispatcherHost( 1098 AddFilter(new SpeechRecognitionDispatcherHost(
1098 GetID(), storage_partition_impl_->GetURLRequestContext())); 1099 GetID(), storage_partition_impl_->GetURLRequestContext()));
1099 AddFilter(new FileAPIMessageFilter( 1100 AddFilter(new FileAPIMessageFilter(
1100 GetID(), storage_partition_impl_->GetURLRequestContext(), 1101 GetID(), storage_partition_impl_->GetURLRequestContext(),
1101 storage_partition_impl_->GetFileSystemContext(), 1102 storage_partition_impl_->GetFileSystemContext(),
1102 blob_storage_context.get(), StreamContext::GetFor(browser_context))); 1103 blob_storage_context.get(), StreamContext::GetFor(browser_context)));
1103 AddFilter(new BlobDispatcherHost( 1104 AddFilter(new BlobDispatcherHost(
1104 GetID(), blob_storage_context, 1105 GetID(), blob_storage_context,
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
1771 cc::switches::kShowCompositedLayerBorders, 1772 cc::switches::kShowCompositedLayerBorders,
1772 cc::switches::kShowFPSCounter, 1773 cc::switches::kShowFPSCounter,
1773 cc::switches::kShowLayerAnimationBounds, 1774 cc::switches::kShowLayerAnimationBounds,
1774 cc::switches::kShowPropertyChangedRects, 1775 cc::switches::kShowPropertyChangedRects,
1775 cc::switches::kShowScreenSpaceRects, 1776 cc::switches::kShowScreenSpaceRects,
1776 cc::switches::kShowSurfaceDamageRects, 1777 cc::switches::kShowSurfaceDamageRects,
1777 cc::switches::kSlowDownRasterScaleFactor, 1778 cc::switches::kSlowDownRasterScaleFactor,
1778 cc::switches::kBrowserControlsHideThreshold, 1779 cc::switches::kBrowserControlsHideThreshold,
1779 cc::switches::kBrowserControlsShowThreshold, 1780 cc::switches::kBrowserControlsShowThreshold,
1780 1781
1781 #if defined(ENABLE_PLUGINS) 1782 #if BUILDFLAG(ENABLE_PLUGINS)
1782 switches::kEnablePepperTesting, 1783 switches::kEnablePepperTesting,
1783 #endif 1784 #endif
1784 #if defined(ENABLE_WEBRTC) 1785 #if defined(ENABLE_WEBRTC)
1785 switches::kDisableWebRtcHWDecoding, 1786 switches::kDisableWebRtcHWDecoding,
1786 switches::kDisableWebRtcHWEncoding, 1787 switches::kDisableWebRtcHWEncoding,
1787 switches::kEnableWebRtcStunOrigin, 1788 switches::kEnableWebRtcStunOrigin,
1788 switches::kEnforceWebRtcIPPermissionCheck, 1789 switches::kEnforceWebRtcIPPermissionCheck,
1789 switches::kForceWebRtcIPHandlingPolicy, 1790 switches::kForceWebRtcIPHandlingPolicy,
1790 switches::kWebRtcMaxCaptureFramerate, 1791 switches::kWebRtcMaxCaptureFramerate,
1791 #endif 1792 #endif
(...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after
2997 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 2998 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
2998 2999
2999 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias 3000 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias
3000 // enough information here so that we can determine what the bad message was. 3001 // enough information here so that we can determine what the bad message was.
3001 base::debug::Alias(&error); 3002 base::debug::Alias(&error);
3002 bad_message::ReceivedBadMessage(render_process_id, 3003 bad_message::ReceivedBadMessage(render_process_id,
3003 bad_message::RPH_MOJO_PROCESS_ERROR); 3004 bad_message::RPH_MOJO_PROCESS_ERROR);
3004 } 3005 }
3005 3006
3006 } // namespace content 3007 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/pepper/browser_ppapi_host_impl.h ('k') | content/browser/storage_partition_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698