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 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
844 // --in-process-webgl. | 844 // --in-process-webgl. |
845 switches::kUseGL, | 845 switches::kUseGL, |
846 switches::kUseMobileUserAgent, | 846 switches::kUseMobileUserAgent, |
847 switches::kUserAgent, | 847 switches::kUserAgent, |
848 switches::kV, | 848 switches::kV, |
849 switches::kVideoThreads, | 849 switches::kVideoThreads, |
850 switches::kVModule, | 850 switches::kVModule, |
851 switches::kWebCoreLogChannels, | 851 switches::kWebCoreLogChannels, |
852 cc::switches::kBackgroundColorInsteadOfCheckerboard, | 852 cc::switches::kBackgroundColorInsteadOfCheckerboard, |
853 cc::switches::kEnableCompositorFrameMessage, | 853 cc::switches::kEnableCompositorFrameMessage, |
| 854 cc::switches::kDisableImplSidePainting, |
854 cc::switches::kEnableImplSidePainting, | 855 cc::switches::kEnableImplSidePainting, |
855 cc::switches::kEnablePartialSwap, | 856 cc::switches::kEnablePartialSwap, |
856 cc::switches::kEnableRightAlignedScheduling, | 857 cc::switches::kEnableRightAlignedScheduling, |
857 cc::switches::kEnableTopControlsPositionCalculation, | 858 cc::switches::kEnableTopControlsPositionCalculation, |
858 cc::switches::kNumRasterThreads, | 859 cc::switches::kNumRasterThreads, |
859 cc::switches::kShowPropertyChangedRects, | 860 cc::switches::kShowPropertyChangedRects, |
860 cc::switches::kShowSurfaceDamageRects, | 861 cc::switches::kShowSurfaceDamageRects, |
861 cc::switches::kShowScreenSpaceRects, | 862 cc::switches::kShowScreenSpaceRects, |
862 cc::switches::kShowReplicaScreenSpaceRects, | 863 cc::switches::kShowReplicaScreenSpaceRects, |
863 cc::switches::kShowNonOccludingRects, | 864 cc::switches::kShowNonOccludingRects, |
(...skipping 11 matching lines...) Expand all Loading... |
875 // Disable databases in incognito mode. | 876 // Disable databases in incognito mode. |
876 if (GetBrowserContext()->IsOffTheRecord() && | 877 if (GetBrowserContext()->IsOffTheRecord() && |
877 !browser_cmd.HasSwitch(switches::kDisableDatabases)) { | 878 !browser_cmd.HasSwitch(switches::kDisableDatabases)) { |
878 renderer_cmd->AppendSwitch(switches::kDisableDatabases); | 879 renderer_cmd->AppendSwitch(switches::kDisableDatabases); |
879 #if defined(OS_ANDROID) | 880 #if defined(OS_ANDROID) |
880 renderer_cmd->AppendSwitch(switches::kDisableMediaHistoryLogging); | 881 renderer_cmd->AppendSwitch(switches::kDisableMediaHistoryLogging); |
881 #endif | 882 #endif |
882 } | 883 } |
883 | 884 |
884 // Enforce the extra command line flags for impl-side painting. | 885 // Enforce the extra command line flags for impl-side painting. |
885 if (browser_cmd.HasSwitch(cc::switches::kEnableImplSidePainting) && | 886 if (cc::switches::IsImplSidePaintingEnabled() && |
886 !browser_cmd.HasSwitch(switches::kEnableDeferredImageDecoding)) | 887 !browser_cmd.HasSwitch(switches::kEnableDeferredImageDecoding)) |
887 renderer_cmd->AppendSwitch(switches::kEnableDeferredImageDecoding); | 888 renderer_cmd->AppendSwitch(switches::kEnableDeferredImageDecoding); |
888 } | 889 } |
889 | 890 |
890 base::ProcessHandle RenderProcessHostImpl::GetHandle() const { | 891 base::ProcessHandle RenderProcessHostImpl::GetHandle() const { |
891 if (run_renderer_in_process()) | 892 if (run_renderer_in_process()) |
892 return base::Process::Current().handle(); | 893 return base::Process::Current().handle(); |
893 | 894 |
894 if (!child_process_launcher_.get() || child_process_launcher_->IsStarting()) | 895 if (!child_process_launcher_.get() || child_process_launcher_->IsStarting()) |
895 return base::kNullProcessHandle; | 896 return base::kNullProcessHandle; |
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1627 TRACE_EVENT0("renderer_host", | 1628 TRACE_EVENT0("renderer_host", |
1628 "RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwappedNoHost"); | 1629 "RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwappedNoHost"); |
1629 AcceleratedSurfaceMsg_BufferPresented_Params ack_params; | 1630 AcceleratedSurfaceMsg_BufferPresented_Params ack_params; |
1630 ack_params.sync_point = 0; | 1631 ack_params.sync_point = 0; |
1631 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id, | 1632 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id, |
1632 gpu_process_host_id, | 1633 gpu_process_host_id, |
1633 ack_params); | 1634 ack_params); |
1634 } | 1635 } |
1635 | 1636 |
1636 } // namespace content | 1637 } // namespace content |
OLD | NEW |