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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 #include "ui/base/ui_base_switches.h" | 146 #include "ui/base/ui_base_switches.h" |
147 #include "ui/events/event_switches.h" | 147 #include "ui/events/event_switches.h" |
148 #include "ui/gfx/switches.h" | 148 #include "ui/gfx/switches.h" |
149 #include "ui/gl/gl_switches.h" | 149 #include "ui/gl/gl_switches.h" |
150 #include "ui/native_theme/native_theme_switches.h" | 150 #include "ui/native_theme/native_theme_switches.h" |
151 #include "webkit/browser/fileapi/sandbox_file_system_backend.h" | 151 #include "webkit/browser/fileapi/sandbox_file_system_backend.h" |
152 | 152 |
153 #if defined(OS_ANDROID) | 153 #if defined(OS_ANDROID) |
154 #include "content/browser/media/android/browser_demuxer_android.h" | 154 #include "content/browser/media/android/browser_demuxer_android.h" |
155 #include "content/browser/renderer_host/compositor_impl_android.h" | 155 #include "content/browser/renderer_host/compositor_impl_android.h" |
| 156 #include "content/browser/screen_orientation/screen_orientation_message_filter_a
ndroid.h" |
156 #include "content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.h" | 157 #include "content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.h" |
157 #endif | 158 #endif |
158 | 159 |
159 #if defined(OS_MACOSX) | 160 #if defined(OS_MACOSX) |
160 #include "content/common/gpu/client/gpu_memory_buffer_impl_io_surface.h" | 161 #include "content/common/gpu/client/gpu_memory_buffer_impl_io_surface.h" |
161 #endif | 162 #endif |
162 | 163 |
163 #if defined(OS_WIN) | 164 #if defined(OS_WIN) |
164 #include "base/strings/string_number_conversions.h" | 165 #include "base/strings/string_number_conversions.h" |
165 #include "base/win/scoped_com_initializer.h" | 166 #include "base/win/scoped_com_initializer.h" |
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
879 AddFilter(new HistogramMessageFilter()); | 880 AddFilter(new HistogramMessageFilter()); |
880 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) | 881 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) |
881 if (CommandLine::ForCurrentProcess()->HasSwitch( | 882 if (CommandLine::ForCurrentProcess()->HasSwitch( |
882 switches::kEnableMemoryBenchmarking)) | 883 switches::kEnableMemoryBenchmarking)) |
883 AddFilter(new MemoryBenchmarkMessageFilter()); | 884 AddFilter(new MemoryBenchmarkMessageFilter()); |
884 #endif | 885 #endif |
885 AddFilter(new VibrationMessageFilter()); | 886 AddFilter(new VibrationMessageFilter()); |
886 AddFilter(new PushMessagingMessageFilter( | 887 AddFilter(new PushMessagingMessageFilter( |
887 GetID(), storage_partition_impl_->GetServiceWorkerContext())); | 888 GetID(), storage_partition_impl_->GetServiceWorkerContext())); |
888 AddFilter(new BatteryStatusMessageFilter()); | 889 AddFilter(new BatteryStatusMessageFilter()); |
| 890 #if defined(OS_ANDROID) |
| 891 AddFilter(new ScreenOrientationMessageFilterAndroid()); |
| 892 #endif |
889 } | 893 } |
890 | 894 |
891 int RenderProcessHostImpl::GetNextRoutingID() { | 895 int RenderProcessHostImpl::GetNextRoutingID() { |
892 return widget_helper_->GetNextRoutingID(); | 896 return widget_helper_->GetNextRoutingID(); |
893 } | 897 } |
894 | 898 |
895 | 899 |
896 void RenderProcessHostImpl::ResumeDeferredNavigation( | 900 void RenderProcessHostImpl::ResumeDeferredNavigation( |
897 const GlobalRequestID& request_id) { | 901 const GlobalRequestID& request_id) { |
898 widget_helper_->ResumeDeferredNavigation(request_id); | 902 widget_helper_->ResumeDeferredNavigation(request_id); |
(...skipping 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2362 void RenderProcessHostImpl::GpuMemoryBufferAllocated( | 2366 void RenderProcessHostImpl::GpuMemoryBufferAllocated( |
2363 IPC::Message* reply, | 2367 IPC::Message* reply, |
2364 const gfx::GpuMemoryBufferHandle& handle) { | 2368 const gfx::GpuMemoryBufferHandle& handle) { |
2365 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2369 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
2366 ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply, | 2370 ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply, |
2367 handle); | 2371 handle); |
2368 Send(reply); | 2372 Send(reply); |
2369 } | 2373 } |
2370 | 2374 |
2371 } // namespace content | 2375 } // namespace content |
OLD | NEW |