| 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 // 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 938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 949 | 949 |
| 950 bool RenderProcessHostImpl::IsGuest() const { | 950 bool RenderProcessHostImpl::IsGuest() const { |
| 951 return is_guest_; | 951 return is_guest_; |
| 952 } | 952 } |
| 953 | 953 |
| 954 StoragePartition* RenderProcessHostImpl::GetStoragePartition() const { | 954 StoragePartition* RenderProcessHostImpl::GetStoragePartition() const { |
| 955 return storage_partition_impl_; | 955 return storage_partition_impl_; |
| 956 } | 956 } |
| 957 | 957 |
| 958 static void AppendGpuCommandLineFlags(CommandLine* command_line) { | 958 static void AppendGpuCommandLineFlags(CommandLine* command_line) { |
| 959 if (content::IsThreadedCompositingEnabled()) | 959 if (IsThreadedCompositingEnabled()) |
| 960 command_line->AppendSwitch(switches::kEnableThreadedCompositing); | 960 command_line->AppendSwitch(switches::kEnableThreadedCompositing); |
| 961 | 961 |
| 962 if (content::IsDelegatedRendererEnabled()) | 962 if (IsForceCompositingModeEnabled()) |
| 963 command_line->AppendSwitch(switches::kForceCompositingMode); |
| 964 |
| 965 if (IsDelegatedRendererEnabled()) |
| 963 command_line->AppendSwitch(switches::kEnableDelegatedRenderer); | 966 command_line->AppendSwitch(switches::kEnableDelegatedRenderer); |
| 964 | 967 |
| 965 if (content::IsImplSidePaintingEnabled()) | 968 if (IsImplSidePaintingEnabled()) |
| 966 command_line->AppendSwitch(switches::kEnableImplSidePainting); | 969 command_line->AppendSwitch(switches::kEnableImplSidePainting); |
| 967 | 970 |
| 968 // Appending disable-gpu-feature switches due to software rendering list. | 971 // Appending disable-gpu-feature switches due to software rendering list. |
| 969 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance(); | 972 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance(); |
| 970 DCHECK(gpu_data_manager); | 973 DCHECK(gpu_data_manager); |
| 971 gpu_data_manager->AppendRendererCommandLine(command_line); | 974 gpu_data_manager->AppendRendererCommandLine(command_line); |
| 972 } | 975 } |
| 973 | 976 |
| 974 void RenderProcessHostImpl::AppendRendererCommandLine( | 977 void RenderProcessHostImpl::AppendRendererCommandLine( |
| 975 CommandLine* command_line) const { | 978 CommandLine* command_line) const { |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1021 switches::kDefaultTileHeight, | 1024 switches::kDefaultTileHeight, |
| 1022 switches::kDisable3DAPIs, | 1025 switches::kDisable3DAPIs, |
| 1023 switches::kDisableAcceleratedCompositing, | 1026 switches::kDisableAcceleratedCompositing, |
| 1024 switches::kDisableAcceleratedFixedRootBackground, | 1027 switches::kDisableAcceleratedFixedRootBackground, |
| 1025 switches::kDisableAcceleratedVideoDecode, | 1028 switches::kDisableAcceleratedVideoDecode, |
| 1026 switches::kDisableApplicationCache, | 1029 switches::kDisableApplicationCache, |
| 1027 switches::kDisableBreakpad, | 1030 switches::kDisableBreakpad, |
| 1028 switches::kDisableCompositingForFixedPosition, | 1031 switches::kDisableCompositingForFixedPosition, |
| 1029 switches::kDisableCompositingForTransition, | 1032 switches::kDisableCompositingForTransition, |
| 1030 switches::kDisableDatabases, | 1033 switches::kDisableDatabases, |
| 1031 switches::kDisableDelegatedRenderer, | |
| 1032 switches::kDisableDesktopNotifications, | 1034 switches::kDisableDesktopNotifications, |
| 1033 switches::kDisableDirectNPAPIRequests, | 1035 switches::kDisableDirectNPAPIRequests, |
| 1034 switches::kDisableFastTextAutosizing, | 1036 switches::kDisableFastTextAutosizing, |
| 1035 switches::kDisableFileSystem, | 1037 switches::kDisableFileSystem, |
| 1036 switches::kDisableFiltersOverIPC, | 1038 switches::kDisableFiltersOverIPC, |
| 1037 switches::kDisableGpu, | 1039 switches::kDisableGpu, |
| 1038 switches::kDisableGpuCompositing, | 1040 switches::kDisableGpuCompositing, |
| 1039 switches::kDisableGpuRasterization, | 1041 switches::kDisableGpuRasterization, |
| 1040 switches::kDisableGpuVsync, | 1042 switches::kDisableGpuVsync, |
| 1041 switches::kDisableLowResTiling, | 1043 switches::kDisableLowResTiling, |
| 1042 switches::kDisableHistogramCustomizer, | 1044 switches::kDisableHistogramCustomizer, |
| 1043 switches::kDisableImplSidePainting, | |
| 1044 switches::kDisableLCDText, | 1045 switches::kDisableLCDText, |
| 1045 switches::kDisableLayerSquashing, | 1046 switches::kDisableLayerSquashing, |
| 1046 switches::kDisableLocalStorage, | 1047 switches::kDisableLocalStorage, |
| 1047 switches::kDisableLogging, | 1048 switches::kDisableLogging, |
| 1048 switches::kDisableMapImage, | 1049 switches::kDisableMapImage, |
| 1049 switches::kDisableOverlayScrollbar, | 1050 switches::kDisableOverlayScrollbar, |
| 1050 switches::kDisablePinch, | 1051 switches::kDisablePinch, |
| 1051 switches::kDisablePrefixedEncryptedMedia, | 1052 switches::kDisablePrefixedEncryptedMedia, |
| 1052 switches::kDisableRepaintAfterLayout, | 1053 switches::kDisableRepaintAfterLayout, |
| 1053 switches::kDisableSeccompFilterSandbox, | 1054 switches::kDisableSeccompFilterSandbox, |
| 1054 switches::kDisableSessionStorage, | 1055 switches::kDisableSessionStorage, |
| 1055 switches::kDisableSharedWorkers, | 1056 switches::kDisableSharedWorkers, |
| 1056 switches::kDisableSpeechInput, | 1057 switches::kDisableSpeechInput, |
| 1057 switches::kDisableThreadedCompositing, | |
| 1058 switches::kDisableTouchAdjustment, | 1058 switches::kDisableTouchAdjustment, |
| 1059 switches::kDisableTouchDragDrop, | 1059 switches::kDisableTouchDragDrop, |
| 1060 switches::kDisableTouchEditing, | 1060 switches::kDisableTouchEditing, |
| 1061 switches::kDisableUniversalAcceleratedOverflowScroll, | 1061 switches::kDisableUniversalAcceleratedOverflowScroll, |
| 1062 switches::kDisableUnprefixedMediaSource, | 1062 switches::kDisableUnprefixedMediaSource, |
| 1063 switches::kDisableWebKitMediaSource, | 1063 switches::kDisableWebKitMediaSource, |
| 1064 switches::kDomAutomationController, | 1064 switches::kDomAutomationController, |
| 1065 switches::kEnableAcceleratedFixedRootBackground, | 1065 switches::kEnableAcceleratedFixedRootBackground, |
| 1066 switches::kEnableAcceleratedOverflowScroll, | 1066 switches::kEnableAcceleratedOverflowScroll, |
| 1067 switches::kEnableAccessibilityLogging, | 1067 switches::kEnableAccessibilityLogging, |
| 1068 switches::kEnableADTSStreamParser, | 1068 switches::kEnableADTSStreamParser, |
| 1069 switches::kEnableBeginFrameScheduling, | 1069 switches::kEnableBeginFrameScheduling, |
| 1070 switches::kEnableBleedingEdgeRenderingFastPaths, | 1070 switches::kEnableBleedingEdgeRenderingFastPaths, |
| 1071 switches::kEnableBrowserPluginForAllViewTypes, | 1071 switches::kEnableBrowserPluginForAllViewTypes, |
| 1072 switches::kEnableCompositingForFixedPosition, | 1072 switches::kEnableCompositingForFixedPosition, |
| 1073 switches::kEnableCompositingForTransition, | 1073 switches::kEnableCompositingForTransition, |
| 1074 switches::kEnableDeferredImageDecoding, | 1074 switches::kEnableDeferredImageDecoding, |
| 1075 switches::kEnableDelegatedRenderer, | |
| 1076 switches::kEnableEncryptedMedia, | 1075 switches::kEnableEncryptedMedia, |
| 1077 switches::kEnableExperimentalCanvasFeatures, | 1076 switches::kEnableExperimentalCanvasFeatures, |
| 1078 switches::kEnableExperimentalWebPlatformFeatures, | 1077 switches::kEnableExperimentalWebPlatformFeatures, |
| 1079 switches::kEnableExperimentalWebSocket, | 1078 switches::kEnableExperimentalWebSocket, |
| 1080 switches::kEnableFastTextAutosizing, | 1079 switches::kEnableFastTextAutosizing, |
| 1081 switches::kEnableGPUClientLogging, | 1080 switches::kEnableGPUClientLogging, |
| 1082 switches::kEnableGpuClientTracing, | 1081 switches::kEnableGpuClientTracing, |
| 1083 switches::kEnableGpuRasterization, | 1082 switches::kEnableGpuRasterization, |
| 1084 switches::kEnableGPUServiceLogging, | 1083 switches::kEnableGPUServiceLogging, |
| 1085 switches::kEnableHighDpiCompositingForFixedPosition, | 1084 switches::kEnableHighDpiCompositingForFixedPosition, |
| 1086 switches::kEnableHTMLImports, | 1085 switches::kEnableHTMLImports, |
| 1087 switches::kEnableLowResTiling, | 1086 switches::kEnableLowResTiling, |
| 1088 switches::kEnableImplSidePainting, | |
| 1089 switches::kEnableInbandTextTracks, | 1087 switches::kEnableInbandTextTracks, |
| 1090 switches::kEnableLCDText, | 1088 switches::kEnableLCDText, |
| 1091 switches::kEnableLayerSquashing, | 1089 switches::kEnableLayerSquashing, |
| 1092 switches::kEnableLogging, | 1090 switches::kEnableLogging, |
| 1093 switches::kEnableMapImage, | 1091 switches::kEnableMapImage, |
| 1094 switches::kEnableMemoryBenchmarking, | 1092 switches::kEnableMemoryBenchmarking, |
| 1095 switches::kEnableOverlayFullscreenVideo, | 1093 switches::kEnableOverlayFullscreenVideo, |
| 1096 switches::kEnableOverlayScrollbar, | 1094 switches::kEnableOverlayScrollbar, |
| 1097 switches::kEnableOverscrollNotifications, | 1095 switches::kEnableOverscrollNotifications, |
| 1098 switches::kEnablePinch, | 1096 switches::kEnablePinch, |
| 1099 switches::kEnablePreparsedJsCaching, | 1097 switches::kEnablePreparsedJsCaching, |
| 1100 switches::kEnableRepaintAfterLayout, | 1098 switches::kEnableRepaintAfterLayout, |
| 1101 switches::kEnableServiceWorker, | 1099 switches::kEnableServiceWorker, |
| 1102 switches::kEnableSkiaBenchmarking, | 1100 switches::kEnableSkiaBenchmarking, |
| 1103 switches::kEnableSoftwareCompositing, | 1101 switches::kEnableSoftwareCompositing, |
| 1104 switches::kEnableSpeechSynthesis, | 1102 switches::kEnableSpeechSynthesis, |
| 1105 switches::kEnableStatsTable, | 1103 switches::kEnableStatsTable, |
| 1106 switches::kEnableStrictSiteIsolation, | 1104 switches::kEnableStrictSiteIsolation, |
| 1107 switches::kEnableTargetedStyleRecalc, | 1105 switches::kEnableTargetedStyleRecalc, |
| 1108 switches::kEnableThreadedCompositing, | |
| 1109 switches::kEnableUniversalAcceleratedOverflowScroll, | 1106 switches::kEnableUniversalAcceleratedOverflowScroll, |
| 1110 switches::kEnableTouchDragDrop, | 1107 switches::kEnableTouchDragDrop, |
| 1111 switches::kEnableTouchEditing, | 1108 switches::kEnableTouchEditing, |
| 1112 switches::kEnableViewport, | 1109 switches::kEnableViewport, |
| 1113 switches::kEnableViewportMeta, | 1110 switches::kEnableViewportMeta, |
| 1114 switches::kMainFrameResizesAreOrientationChanges, | 1111 switches::kMainFrameResizesAreOrientationChanges, |
| 1115 switches::kEnableVtune, | 1112 switches::kEnableVtune, |
| 1116 switches::kEnableWebAnimationsSVG, | 1113 switches::kEnableWebAnimationsSVG, |
| 1117 switches::kEnableWebGLDraftExtensions, | 1114 switches::kEnableWebGLDraftExtensions, |
| 1118 switches::kEnableWebMIDI, | 1115 switches::kEnableWebMIDI, |
| (...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2159 void RenderProcessHostImpl::SetWebUIHandle( | 2156 void RenderProcessHostImpl::SetWebUIHandle( |
| 2160 int32 view_routing_id, | 2157 int32 view_routing_id, |
| 2161 mojo::ScopedMessagePipeHandle handle) { | 2158 mojo::ScopedMessagePipeHandle handle) { |
| 2162 if (!render_process_host_mojo_) | 2159 if (!render_process_host_mojo_) |
| 2163 render_process_host_mojo_.reset(new RenderProcessHostMojoImpl(this)); | 2160 render_process_host_mojo_.reset(new RenderProcessHostMojoImpl(this)); |
| 2164 render_process_host_mojo_->SetWebUIHandle(view_routing_id, handle.Pass()); | 2161 render_process_host_mojo_->SetWebUIHandle(view_routing_id, handle.Pass()); |
| 2165 } | 2162 } |
| 2166 #endif | 2163 #endif |
| 2167 | 2164 |
| 2168 } // namespace content | 2165 } // namespace content |
| OLD | NEW |