Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2522843002: Convert Gamepad IPC messages into mojo interface. (Closed)
Patch Set: Convert Gamepad IPC messages into mojo interface. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 #include "content/browser/notifications/platform_notification_context_impl.h" 90 #include "content/browser/notifications/platform_notification_context_impl.h"
91 #include "content/browser/payments/payment_app_manager.h" 91 #include "content/browser/payments/payment_app_manager.h"
92 #include "content/browser/permissions/permission_service_context.h" 92 #include "content/browser/permissions/permission_service_context.h"
93 #include "content/browser/permissions/permission_service_impl.h" 93 #include "content/browser/permissions/permission_service_impl.h"
94 #include "content/browser/profiler_message_filter.h" 94 #include "content/browser/profiler_message_filter.h"
95 #include "content/browser/push_messaging/push_messaging_message_filter.h" 95 #include "content/browser/push_messaging/push_messaging_message_filter.h"
96 #include "content/browser/quota_dispatcher_host.h" 96 #include "content/browser/quota_dispatcher_host.h"
97 #include "content/browser/renderer_host/clipboard_message_filter.h" 97 #include "content/browser/renderer_host/clipboard_message_filter.h"
98 #include "content/browser/renderer_host/database_message_filter.h" 98 #include "content/browser/renderer_host/database_message_filter.h"
99 #include "content/browser/renderer_host/file_utilities_message_filter.h" 99 #include "content/browser/renderer_host/file_utilities_message_filter.h"
100 #include "content/browser/renderer_host/gamepad_browser_message_filter.h" 100 #include "content/browser/renderer_host/gamepad_monitor.h"
101 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" 101 #include "content/browser/renderer_host/media/audio_input_renderer_host.h"
102 #include "content/browser/renderer_host/media/audio_renderer_host.h" 102 #include "content/browser/renderer_host/media/audio_renderer_host.h"
103 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h" 103 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h"
104 #include "content/browser/renderer_host/media/peer_connection_tracker_host.h" 104 #include "content/browser/renderer_host/media/peer_connection_tracker_host.h"
105 #include "content/browser/renderer_host/media/video_capture_host.h" 105 #include "content/browser/renderer_host/media/video_capture_host.h"
106 #include "content/browser/renderer_host/offscreen_canvas_compositor_frame_sink_p rovider_impl.h" 106 #include "content/browser/renderer_host/offscreen_canvas_compositor_frame_sink_p rovider_impl.h"
107 #include "content/browser/renderer_host/offscreen_canvas_surface_impl.h" 107 #include "content/browser/renderer_host/offscreen_canvas_surface_impl.h"
108 #include "content/browser/renderer_host/pepper/pepper_message_filter.h" 108 #include "content/browser/renderer_host/pepper/pepper_message_filter.h"
109 #include "content/browser/renderer_host/pepper/pepper_renderer_connection.h" 109 #include "content/browser/renderer_host/pepper/pepper_renderer_connection.h"
110 #include "content/browser/renderer_host/render_message_filter.h" 110 #include "content/browser/renderer_host/render_message_filter.h"
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after
1163 GetContentClient()->browser()->CreateQuotaPermissionContext())); 1163 GetContentClient()->browser()->CreateQuotaPermissionContext()));
1164 1164
1165 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context( 1165 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context(
1166 static_cast<ServiceWorkerContextWrapper*>( 1166 static_cast<ServiceWorkerContextWrapper*>(
1167 storage_partition_impl_->GetServiceWorkerContext())); 1167 storage_partition_impl_->GetServiceWorkerContext()));
1168 notification_message_filter_ = new NotificationMessageFilter( 1168 notification_message_filter_ = new NotificationMessageFilter(
1169 GetID(), storage_partition_impl_->GetPlatformNotificationContext(), 1169 GetID(), storage_partition_impl_->GetPlatformNotificationContext(),
1170 resource_context, service_worker_context, browser_context); 1170 resource_context, service_worker_context, browser_context);
1171 AddFilter(notification_message_filter_.get()); 1171 AddFilter(notification_message_filter_.get());
1172 1172
1173 AddFilter(new GamepadBrowserMessageFilter());
1174 AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); 1173 AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER));
1175 AddFilter(new HistogramMessageFilter()); 1174 AddFilter(new HistogramMessageFilter());
1176 AddFilter(new MemoryMessageFilter(this)); 1175 AddFilter(new MemoryMessageFilter(this));
1177 AddFilter(new PushMessagingMessageFilter( 1176 AddFilter(new PushMessagingMessageFilter(
1178 GetID(), storage_partition_impl_->GetServiceWorkerContext())); 1177 GetID(), storage_partition_impl_->GetServiceWorkerContext()));
1179 #if defined(OS_ANDROID) 1178 #if defined(OS_ANDROID)
1180 AddFilter(new ScreenOrientationMessageFilterAndroid()); 1179 AddFilter(new ScreenOrientationMessageFilterAndroid());
1181 synchronous_compositor_filter_ = 1180 synchronous_compositor_filter_ =
1182 new SynchronousCompositorBrowserFilter(GetID()); 1181 new SynchronousCompositorBrowserFilter(GetID());
1183 AddFilter(synchronous_compositor_filter_.get()); 1182 AddFilter(synchronous_compositor_filter_.get());
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
1277 base::Bind(&DeviceOrientationAbsoluteHost::Create)); 1276 base::Bind(&DeviceOrientationAbsoluteHost::Create));
1278 #else 1277 #else
1279 // On platforms other than Android the device sensors implementations run on 1278 // On platforms other than Android the device sensors implementations run on
1280 // the IO thread. 1279 // the IO thread.
1281 registry->AddInterface(base::Bind(&DeviceLightHost::Create)); 1280 registry->AddInterface(base::Bind(&DeviceLightHost::Create));
1282 registry->AddInterface(base::Bind(&DeviceMotionHost::Create)); 1281 registry->AddInterface(base::Bind(&DeviceMotionHost::Create));
1283 registry->AddInterface(base::Bind(&DeviceOrientationHost::Create)); 1282 registry->AddInterface(base::Bind(&DeviceOrientationHost::Create));
1284 registry->AddInterface(base::Bind(&DeviceOrientationAbsoluteHost::Create)); 1283 registry->AddInterface(base::Bind(&DeviceOrientationAbsoluteHost::Create));
1285 #endif // defined(OS_ANDROID) 1284 #endif // defined(OS_ANDROID)
1286 1285
1286 registry->AddInterface(base::Bind(&GamepadMonitor::Create));
1287
1287 registry->AddInterface( 1288 registry->AddInterface(
1288 base::Bind(&VideoCaptureHost::Create, 1289 base::Bind(&VideoCaptureHost::Create,
1289 BrowserMainLoop::GetInstance()->media_stream_manager())); 1290 BrowserMainLoop::GetInstance()->media_stream_manager()));
1290 1291
1291 // This is to support usage of WebSockets in cases in which there is no 1292 // This is to support usage of WebSockets in cases in which there is no
1292 // associated RenderFrame (e.g., Shared Workers). 1293 // associated RenderFrame (e.g., Shared Workers).
1293 AddUIThreadInterface( 1294 AddUIThreadInterface(
1294 registry.get(), base::Bind(&WebSocketManager::CreateWebSocket, GetID(), 1295 registry.get(), base::Bind(&WebSocketManager::CreateWebSocket, GetID(),
1295 MSG_ROUTING_NONE)); 1296 MSG_ROUTING_NONE));
1296 1297
(...skipping 1703 matching lines...) Expand 10 before | Expand all | Expand 10 after
3000 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 3001 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
3001 3002
3002 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias 3003 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias
3003 // enough information here so that we can determine what the bad message was. 3004 // enough information here so that we can determine what the bad message was.
3004 base::debug::Alias(&error); 3005 base::debug::Alias(&error);
3005 bad_message::ReceivedBadMessage(render_process_id, 3006 bad_message::ReceivedBadMessage(render_process_id,
3006 bad_message::RPH_MOJO_PROCESS_ERROR); 3007 bad_message::RPH_MOJO_PROCESS_ERROR);
3007 } 3008 }
3008 3009
3009 } // namespace content 3010 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698