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