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

Side by Side Diff: content/common/child_process_host_impl.cc

Issue 19762004: Add multi-process GpuMemoryBuffer framework. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 months 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 | Annotate | Revision Log
« no previous file with comments | « content/common/child_process_host_impl.h ('k') | content/common/child_process_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "content/common/child_process_host_impl.h" 5 #include "content/common/child_process_host_impl.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/atomicops.h" 9 #include "base/atomicops.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 } 240 }
241 } 241 }
242 242
243 if (!handled) { 243 if (!handled) {
244 handled = true; 244 handled = true;
245 IPC_BEGIN_MESSAGE_MAP(ChildProcessHostImpl, msg) 245 IPC_BEGIN_MESSAGE_MAP(ChildProcessHostImpl, msg)
246 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_ShutdownRequest, 246 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_ShutdownRequest,
247 OnShutdownRequest) 247 OnShutdownRequest)
248 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_SyncAllocateSharedMemory, 248 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_SyncAllocateSharedMemory,
249 OnAllocateSharedMemory) 249 OnAllocateSharedMemory)
250 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer,
251 OnAllocateGpuMemoryBuffer)
250 IPC_MESSAGE_UNHANDLED(handled = false) 252 IPC_MESSAGE_UNHANDLED(handled = false)
251 IPC_END_MESSAGE_MAP() 253 IPC_END_MESSAGE_MAP()
252 254
253 if (!handled) 255 if (!handled)
254 handled = delegate_->OnMessageReceived(msg); 256 handled = delegate_->OnMessageReceived(msg);
255 } 257 }
256 258
257 #ifdef IPC_MESSAGE_LOG_ENABLED 259 #ifdef IPC_MESSAGE_LOG_ENABLED
258 if (logger->Enabled()) 260 if (logger->Enabled())
259 logger->OnPostDispatchMessage(msg, channel_id_); 261 logger->OnPostDispatchMessage(msg, channel_id_);
(...skipping 26 matching lines...) Expand all
286 uint32 buffer_size, 288 uint32 buffer_size,
287 base::SharedMemoryHandle* handle) { 289 base::SharedMemoryHandle* handle) {
288 AllocateSharedMemory(buffer_size, peer_handle_, handle); 290 AllocateSharedMemory(buffer_size, peer_handle_, handle);
289 } 291 }
290 292
291 void ChildProcessHostImpl::OnShutdownRequest() { 293 void ChildProcessHostImpl::OnShutdownRequest() {
292 if (delegate_->CanShutdown()) 294 if (delegate_->CanShutdown())
293 Send(new ChildProcessMsg_Shutdown()); 295 Send(new ChildProcessMsg_Shutdown());
294 } 296 }
295 297
298 void ChildProcessHostImpl::OnAllocateGpuMemoryBuffer(
299 uint32 buffer_size,
300 gfx::GpuMemoryBufferHandle* handle) {
301 handle->type = gfx::SHARED_MEMORY_BUFFER;
302 AllocateSharedMemory(buffer_size, peer_handle_, &handle->handle);
303 }
304
296 } // namespace content 305 } // namespace content
OLDNEW
« no previous file with comments | « content/common/child_process_host_impl.h ('k') | content/common/child_process_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698