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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 #include "content/browser/child_process_security_policy_impl.h" | 45 #include "content/browser/child_process_security_policy_impl.h" |
46 #include "content/browser/device_orientation/device_motion_message_filter.h" | 46 #include "content/browser/device_orientation/device_motion_message_filter.h" |
47 #include "content/browser/device_orientation/device_orientation_message_filter.h
" | 47 #include "content/browser/device_orientation/device_orientation_message_filter.h
" |
48 #include "content/browser/device_orientation/orientation_message_filter.h" | 48 #include "content/browser/device_orientation/orientation_message_filter.h" |
49 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" | 49 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" |
50 #include "content/browser/dom_storage/dom_storage_message_filter.h" | 50 #include "content/browser/dom_storage/dom_storage_message_filter.h" |
51 #include "content/browser/download/mhtml_generation_manager.h" | 51 #include "content/browser/download/mhtml_generation_manager.h" |
52 #include "content/browser/fileapi/chrome_blob_storage_context.h" | 52 #include "content/browser/fileapi/chrome_blob_storage_context.h" |
53 #include "content/browser/fileapi/fileapi_message_filter.h" | 53 #include "content/browser/fileapi/fileapi_message_filter.h" |
54 #include "content/browser/geolocation/geolocation_dispatcher_host.h" | 54 #include "content/browser/geolocation/geolocation_dispatcher_host.h" |
| 55 #include "content/browser/gpu/compositor_util.h" |
55 #include "content/browser/gpu/gpu_data_manager_impl.h" | 56 #include "content/browser/gpu/gpu_data_manager_impl.h" |
56 #include "content/browser/gpu/gpu_process_host.h" | 57 #include "content/browser/gpu/gpu_process_host.h" |
57 #include "content/browser/gpu/shader_disk_cache.h" | 58 #include "content/browser/gpu/shader_disk_cache.h" |
58 #include "content/browser/histogram_message_filter.h" | 59 #include "content/browser/histogram_message_filter.h" |
59 #include "content/browser/indexed_db/indexed_db_context_impl.h" | 60 #include "content/browser/indexed_db/indexed_db_context_impl.h" |
60 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" | 61 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" |
61 #include "content/browser/loader/resource_message_filter.h" | 62 #include "content/browser/loader/resource_message_filter.h" |
62 #include "content/browser/loader/resource_scheduler_filter.h" | 63 #include "content/browser/loader/resource_scheduler_filter.h" |
63 #include "content/browser/media/media_internals.h" | 64 #include "content/browser/media/media_internals.h" |
64 #include "content/browser/mime_registry_message_filter.h" | 65 #include "content/browser/mime_registry_message_filter.h" |
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
810 // If we run base::FieldTrials, we want to pass to their state to the | 811 // If we run base::FieldTrials, we want to pass to their state to the |
811 // renderer so that it can act in accordance with each state, or record | 812 // renderer so that it can act in accordance with each state, or record |
812 // histograms relating to the base::FieldTrial states. | 813 // histograms relating to the base::FieldTrial states. |
813 std::string field_trial_states; | 814 std::string field_trial_states; |
814 base::FieldTrialList::StatesToString(&field_trial_states); | 815 base::FieldTrialList::StatesToString(&field_trial_states); |
815 if (!field_trial_states.empty()) { | 816 if (!field_trial_states.empty()) { |
816 command_line->AppendSwitchASCII(switches::kForceFieldTrials, | 817 command_line->AppendSwitchASCII(switches::kForceFieldTrials, |
817 field_trial_states); | 818 field_trial_states); |
818 } | 819 } |
819 | 820 |
| 821 if (content::IsThreadedCompositingEnabled()) |
| 822 command_line->AppendSwitch(switches::kEnableThreadedCompositing); |
| 823 |
820 GetContentClient()->browser()->AppendExtraCommandLineSwitches( | 824 GetContentClient()->browser()->AppendExtraCommandLineSwitches( |
821 command_line, GetID()); | 825 command_line, GetID()); |
822 | 826 |
823 // Appending disable-gpu-feature switches due to software rendering list. | 827 // Appending disable-gpu-feature switches due to software rendering list. |
824 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance(); | 828 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance(); |
825 DCHECK(gpu_data_manager); | 829 DCHECK(gpu_data_manager); |
826 gpu_data_manager->AppendRendererCommandLine(command_line); | 830 gpu_data_manager->AppendRendererCommandLine(command_line); |
827 } | 831 } |
828 | 832 |
829 void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( | 833 void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( |
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1763 // Skip widgets in other processes. | 1767 // Skip widgets in other processes. |
1764 if (widgets[i]->GetProcess()->GetID() != GetID()) | 1768 if (widgets[i]->GetProcess()->GetID() != GetID()) |
1765 continue; | 1769 continue; |
1766 | 1770 |
1767 RenderViewHost* rvh = RenderViewHost::From(widgets[i]); | 1771 RenderViewHost* rvh = RenderViewHost::From(widgets[i]); |
1768 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences()); | 1772 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences()); |
1769 } | 1773 } |
1770 } | 1774 } |
1771 | 1775 |
1772 } // namespace content | 1776 } // namespace content |
OLD | NEW |