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

Unified Diff: device/gamepad/gamepad_provider.cc

Issue 2522843002: Convert Gamepad IPC messages into mojo interface. (Closed)
Patch Set: code rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/gamepad/gamepad_provider.h ('k') | device/gamepad/public/interfaces/gamepad.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/gamepad/gamepad_provider.cc
diff --git a/device/gamepad/gamepad_provider.cc b/device/gamepad/gamepad_provider.cc
index 701e0a41f073a1131bd2dfa13cbad0bccc564598..024fdba39ab146e98f95c5b172e645d99bb43576 100644
--- a/device/gamepad/gamepad_provider.cc
+++ b/device/gamepad/gamepad_provider.cc
@@ -94,6 +94,11 @@ base::SharedMemoryHandle GamepadProvider::GetSharedMemoryHandleForProcess(
return renderer_handle;
}
+base::SharedMemoryHandle GamepadProvider::GetSharedMemoryHandle() {
+ return base::SharedMemory::DuplicateHandle(
+ gamepad_shared_buffer_->shared_memory()->handle());
+}
+
void GamepadProvider::GetCurrentGamepadData(WebGamepads* data) {
const WebGamepads* pads = gamepad_shared_buffer_->buffer();
base::AutoLock lock(shared_memory_lock_);
« no previous file with comments | « device/gamepad/gamepad_provider.h ('k') | device/gamepad/public/interfaces/gamepad.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698