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

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

Issue 2808093006: [Device Service] Move Gamepad Blink headers to be part of the Gamepad client library (Closed)
Patch Set: rebase and address comments Created 3 years, 8 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
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_PLATFORM_DATA_FETCHER_LINUX_H_ 5 #ifndef DEVICE_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_LINUX_H_
6 #define DEVICE_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_LINUX_H_ 6 #define DEVICE_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_LINUX_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <string> 11 #include <string>
12 12
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "device/gamepad/gamepad_data_fetcher.h" 15 #include "device/gamepad/gamepad_data_fetcher.h"
16 #include "device/gamepad/public/cpp/gamepads.h"
16 17
17 extern "C" { 18 extern "C" {
18 struct udev_device; 19 struct udev_device;
19 } 20 }
20 21
21 namespace device { 22 namespace device {
22 class UdevLinux; 23 class UdevLinux;
23 } 24 }
24 25
25 namespace device { 26 namespace device {
(...skipping 14 matching lines...) Expand all
40 void GetGamepadData(bool devices_changed_hint) override; 41 void GetGamepadData(bool devices_changed_hint) override;
41 42
42 private: 43 private:
43 void OnAddedToProvider() override; 44 void OnAddedToProvider() override;
44 45
45 void RefreshDevice(udev_device* dev); 46 void RefreshDevice(udev_device* dev);
46 void EnumerateDevices(); 47 void EnumerateDevices();
47 void ReadDeviceData(size_t index); 48 void ReadDeviceData(size_t index);
48 49
49 // File descriptor for the /dev/input/js* devices. -1 if not in use. 50 // File descriptor for the /dev/input/js* devices. -1 if not in use.
50 int device_fd_[blink::WebGamepads::kItemsLengthCap]; 51 int device_fd_[Gamepads::kItemsLengthCap];
51 52
52 std::unique_ptr<device::UdevLinux> udev_; 53 std::unique_ptr<device::UdevLinux> udev_;
53 54
54 DISALLOW_COPY_AND_ASSIGN(GamepadPlatformDataFetcherLinux); 55 DISALLOW_COPY_AND_ASSIGN(GamepadPlatformDataFetcherLinux);
55 }; 56 };
56 57
57 } // namespace device 58 } // namespace device
58 59
59 #endif // DEVICE_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_LINUX_H_ 60 #endif // DEVICE_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_LINUX_H_
OLDNEW
« no previous file with comments | « device/gamepad/gamepad_platform_data_fetcher_android.cc ('k') | device/gamepad/gamepad_platform_data_fetcher_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698