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

Side by Side Diff: device/gamepad/gamepad_provider.h

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 (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 DEVICE_GAMEPAD_GAMEPAD_PROVIDER_H_ 5 #ifndef DEVICE_GAMEPAD_GAMEPAD_PROVIDER_H_
6 #define DEVICE_GAMEPAD_GAMEPAD_PROVIDER_H_ 6 #define DEVICE_GAMEPAD_GAMEPAD_PROVIDER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 GamepadConnectionChangeClient* connection_change_client, 51 GamepadConnectionChangeClient* connection_change_client,
52 std::unique_ptr<GamepadDataFetcher> fetcher); 52 std::unique_ptr<GamepadDataFetcher> fetcher);
53 53
54 ~GamepadProvider() override; 54 ~GamepadProvider() override;
55 55
56 // Returns the shared memory handle of the gamepad data duplicated into the 56 // Returns the shared memory handle of the gamepad data duplicated into the
57 // given process. 57 // given process.
58 base::SharedMemoryHandle GetSharedMemoryHandleForProcess( 58 base::SharedMemoryHandle GetSharedMemoryHandleForProcess(
59 base::ProcessHandle renderer_process); 59 base::ProcessHandle renderer_process);
60 60
61 // Returns the shared memory handle of the gamepad data.
blundell 2016/12/06 12:26:50 Could you add a TODO and bug to follow up by movin
ke.he 2016/12/07 08:05:10 Done.
62 base::SharedMemoryHandle GetSharedMemoryHandle();
63
61 void AddGamepadDataFetcher(GamepadDataFetcher* fetcher); 64 void AddGamepadDataFetcher(GamepadDataFetcher* fetcher);
62 void RemoveGamepadDataFetcher(GamepadDataFetcher* fetcher); 65 void RemoveGamepadDataFetcher(GamepadDataFetcher* fetcher);
63 66
64 void GetCurrentGamepadData(blink::WebGamepads* data); 67 void GetCurrentGamepadData(blink::WebGamepads* data);
65 68
66 // Pause and resume the background polling thread. Can be called from any 69 // Pause and resume the background polling thread. Can be called from any
67 // thread. 70 // thread.
68 void Pause(); 71 void Pause();
69 void Resume(); 72 void Resume();
70 73
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 std::unique_ptr<base::Thread> polling_thread_; 161 std::unique_ptr<base::Thread> polling_thread_;
159 162
160 GamepadConnectionChangeClient* connection_change_client_; 163 GamepadConnectionChangeClient* connection_change_client_;
161 164
162 DISALLOW_COPY_AND_ASSIGN(GamepadProvider); 165 DISALLOW_COPY_AND_ASSIGN(GamepadProvider);
163 }; 166 };
164 167
165 } // namespace device 168 } // namespace device
166 169
167 #endif // DEVICE_GAMEPAD_GAMEPAD_PROVIDER_H_ 170 #endif // DEVICE_GAMEPAD_GAMEPAD_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698