| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 #include "ui/base/ui_base_switches.h" | 145 #include "ui/base/ui_base_switches.h" |
| 146 #include "ui/events/event_switches.h" | 146 #include "ui/events/event_switches.h" |
| 147 #include "ui/gfx/switches.h" | 147 #include "ui/gfx/switches.h" |
| 148 #include "ui/gl/gl_switches.h" | 148 #include "ui/gl/gl_switches.h" |
| 149 #include "ui/native_theme/native_theme_switches.h" | 149 #include "ui/native_theme/native_theme_switches.h" |
| 150 #include "webkit/browser/fileapi/sandbox_file_system_backend.h" | 150 #include "webkit/browser/fileapi/sandbox_file_system_backend.h" |
| 151 | 151 |
| 152 #if defined(OS_ANDROID) | 152 #if defined(OS_ANDROID) |
| 153 #include "content/browser/media/android/browser_demuxer_android.h" | 153 #include "content/browser/media/android/browser_demuxer_android.h" |
| 154 #include "content/browser/renderer_host/compositor_impl_android.h" | 154 #include "content/browser/renderer_host/compositor_impl_android.h" |
| 155 #include "content/browser/screen_orientation/screen_orientation_message_filter_a
ndroid.h" |
| 155 #include "content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.h" | 156 #include "content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.h" |
| 156 #endif | 157 #endif |
| 157 | 158 |
| 158 #if defined(OS_MACOSX) | 159 #if defined(OS_MACOSX) |
| 159 #include "content/common/gpu/client/gpu_memory_buffer_impl_io_surface.h" | 160 #include "content/common/gpu/client/gpu_memory_buffer_impl_io_surface.h" |
| 160 #endif | 161 #endif |
| 161 | 162 |
| 162 #if defined(OS_WIN) | 163 #if defined(OS_WIN) |
| 163 #include "base/strings/string_number_conversions.h" | 164 #include "base/strings/string_number_conversions.h" |
| 164 #include "base/win/scoped_com_initializer.h" | 165 #include "base/win/scoped_com_initializer.h" |
| (...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 886 AddFilter(new HistogramMessageFilter()); | 887 AddFilter(new HistogramMessageFilter()); |
| 887 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) | 888 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) |
| 888 if (CommandLine::ForCurrentProcess()->HasSwitch( | 889 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 889 switches::kEnableMemoryBenchmarking)) | 890 switches::kEnableMemoryBenchmarking)) |
| 890 AddFilter(new MemoryBenchmarkMessageFilter()); | 891 AddFilter(new MemoryBenchmarkMessageFilter()); |
| 891 #endif | 892 #endif |
| 892 AddFilter(new VibrationMessageFilter()); | 893 AddFilter(new VibrationMessageFilter()); |
| 893 AddFilter(new PushMessagingMessageFilter( | 894 AddFilter(new PushMessagingMessageFilter( |
| 894 GetID(), storage_partition_impl_->GetServiceWorkerContext())); | 895 GetID(), storage_partition_impl_->GetServiceWorkerContext())); |
| 895 AddFilter(new BatteryStatusMessageFilter()); | 896 AddFilter(new BatteryStatusMessageFilter()); |
| 897 #if defined(OS_ANDROID) |
| 898 AddFilter(new ScreenOrientationMessageFilterAndroid()); |
| 899 #endif |
| 896 } | 900 } |
| 897 | 901 |
| 898 int RenderProcessHostImpl::GetNextRoutingID() { | 902 int RenderProcessHostImpl::GetNextRoutingID() { |
| 899 return widget_helper_->GetNextRoutingID(); | 903 return widget_helper_->GetNextRoutingID(); |
| 900 } | 904 } |
| 901 | 905 |
| 902 | 906 |
| 903 void RenderProcessHostImpl::ResumeDeferredNavigation( | 907 void RenderProcessHostImpl::ResumeDeferredNavigation( |
| 904 const GlobalRequestID& request_id) { | 908 const GlobalRequestID& request_id) { |
| 905 widget_helper_->ResumeDeferredNavigation(request_id); | 909 widget_helper_->ResumeDeferredNavigation(request_id); |
| (...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2341 } | 2345 } |
| 2342 | 2346 |
| 2343 void RenderProcessHostImpl::OnDeletedGpuMemoryBuffer( | 2347 void RenderProcessHostImpl::OnDeletedGpuMemoryBuffer( |
| 2344 gfx::GpuMemoryBufferType type, | 2348 gfx::GpuMemoryBufferType type, |
| 2345 const gfx::GpuMemoryBufferId& id) { | 2349 const gfx::GpuMemoryBufferId& id) { |
| 2346 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2350 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 2347 GpuMemoryBufferImpl::DeletedByChildProcess(type, id, GetHandle()); | 2351 GpuMemoryBufferImpl::DeletedByChildProcess(type, id, GetHandle()); |
| 2348 } | 2352 } |
| 2349 | 2353 |
| 2350 } // namespace content | 2354 } // namespace content |
| OLD | NEW |