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

Side by Side Diff: content/browser/renderer_host/pepper/pepper_gamepad_host.cc

Issue 725353003: Don't pass ProcessHandle through ChildProcessHostDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo Created 6 years, 1 month 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 (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/browser/renderer_host/pepper/pepper_gamepad_host.h" 5 #include "content/browser/renderer_host/pepper/pepper_gamepad_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "content/browser/gamepad/gamepad_service.h" 8 #include "content/browser/gamepad/gamepad_service.h"
9 #include "content/public/browser/browser_ppapi_host.h" 9 #include "content/public/browser/browser_ppapi_host.h"
10 #include "ppapi/c/pp_errors.h" 10 #include "ppapi/c/pp_errors.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 base::Bind(&PepperGamepadHost::GotUserGesture, 65 base::Bind(&PepperGamepadHost::GotUserGesture,
66 weak_factory_.GetWeakPtr(), 66 weak_factory_.GetWeakPtr(),
67 context->MakeReplyMessageContext())); 67 context->MakeReplyMessageContext()));
68 return PP_OK_COMPLETIONPENDING; 68 return PP_OK_COMPLETIONPENDING;
69 } 69 }
70 70
71 void PepperGamepadHost::GotUserGesture( 71 void PepperGamepadHost::GotUserGesture(
72 const ppapi::host::ReplyMessageContext& context) { 72 const ppapi::host::ReplyMessageContext& context) {
73 base::SharedMemoryHandle handle = 73 base::SharedMemoryHandle handle =
74 gamepad_service_->GetSharedMemoryHandleForProcess( 74 gamepad_service_->GetSharedMemoryHandleForProcess(
75 browser_ppapi_host_->GetPluginProcessHandle()); 75 browser_ppapi_host_->GetPluginProcess().Handle());
76 76
77 context.params.AppendHandle(ppapi::proxy::SerializedHandle( 77 context.params.AppendHandle(ppapi::proxy::SerializedHandle(
78 handle, sizeof(ppapi::ContentGamepadHardwareBuffer))); 78 handle, sizeof(ppapi::ContentGamepadHardwareBuffer)));
79 host()->SendReply(context, PpapiPluginMsg_Gamepad_SendMemory()); 79 host()->SendReply(context, PpapiPluginMsg_Gamepad_SendMemory());
80 } 80 }
81 81
82 } // namespace content 82 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc ('k') | content/common/child_process_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698