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

Side by Side Diff: content/browser/gamepad/gamepad_service.h

Issue 2522843002: Convert Gamepad IPC messages into mojo interface. (Closed)
Patch Set: add GetSharedMemoryHandle() in GamepadService. 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 (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 #ifndef CONTENT_BROWSER_GAMEPAD_GAMEPAD_SERVICE_H_ 5 #ifndef CONTENT_BROWSER_GAMEPAD_GAMEPAD_SERVICE_H_
6 #define CONTENT_BROWSER_GAMEPAD_GAMEPAD_SERVICE_H_ 6 #define CONTENT_BROWSER_GAMEPAD_GAMEPAD_SERVICE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // Registers the given closure for calling when the user has interacted with 67 // Registers the given closure for calling when the user has interacted with
68 // the device. This callback will only be issued once. Should only be called 68 // the device. This callback will only be issued once. Should only be called
69 // while a consumer is active. 69 // while a consumer is active.
70 void RegisterForUserGesture(const base::Closure& closure); 70 void RegisterForUserGesture(const base::Closure& closure);
71 71
72 // Returns the shared memory handle of the gamepad data duplicated into the 72 // Returns the shared memory handle of the gamepad data duplicated into the
73 // given process. 73 // given process.
74 base::SharedMemoryHandle GetSharedMemoryHandleForProcess( 74 base::SharedMemoryHandle GetSharedMemoryHandleForProcess(
75 base::ProcessHandle handle); 75 base::ProcessHandle handle);
76 76
77 // Returns the shared memory handle of the gamepad data.
78 base::SharedMemoryHandle GetSharedMemoryHandle();
blundell 2016/12/05 15:22:34 Ah, I just thought of something even better: This
ke.he 2016/12/06 09:51:27 Done.
79
77 // Stop/join with the background thread in GamepadProvider |provider_|. 80 // Stop/join with the background thread in GamepadProvider |provider_|.
78 void Terminate(); 81 void Terminate();
79 82
80 // Called on IO thread when a gamepad is connected. 83 // Called on IO thread when a gamepad is connected.
81 void OnGamepadConnected(int index, const blink::WebGamepad& pad); 84 void OnGamepadConnected(int index, const blink::WebGamepad& pad);
82 85
83 // Called on IO thread when a gamepad is disconnected. 86 // Called on IO thread when a gamepad is disconnected.
84 void OnGamepadDisconnected(int index, const blink::WebGamepad& pad); 87 void OnGamepadDisconnected(int index, const blink::WebGamepad& pad);
85 88
86 private: 89 private:
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 int num_active_consumers_; 133 int num_active_consumers_;
131 134
132 bool gesture_callback_pending_; 135 bool gesture_callback_pending_;
133 136
134 DISALLOW_COPY_AND_ASSIGN(GamepadService); 137 DISALLOW_COPY_AND_ASSIGN(GamepadService);
135 }; 138 };
136 139
137 } // namespace content 140 } // namespace content
138 141
139 #endif // CONTENT_BROWSER_GAMEPAD_GAMEPAD_SERVICE_H_ 142 #endif // CONTENT_BROWSER_GAMEPAD_GAMEPAD_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698