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

Unified Diff: device/gamepad/public/cpp/gamepads.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/gamepad/public/cpp/gamepad.cc ('k') | device/gamepad/public/interfaces/OWNERS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/gamepad/public/cpp/gamepads.h
diff --git a/device/gamepad/public/cpp/gamepads.h b/device/gamepad/public/cpp/gamepads.h
new file mode 100644
index 0000000000000000000000000000000000000000..e5ebebfb2515c18e5d6297abede59588c4eec756
--- /dev/null
+++ b/device/gamepad/public/cpp/gamepads.h
@@ -0,0 +1,29 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef DEVICE_GAMEPAD_PUBLIC_CPP_GAMEPADS_H_
+#define DEVICE_GAMEPAD_PUBLIC_CPP_GAMEPADS_H_
+
+#include "device/gamepad/public/cpp/gamepad.h"
+
+namespace device {
+
+#pragma pack(push, 4)
+
+// This structure is intentionally POD and fixed size so that it can be stored
+// in shared memory between hardware polling threads and the rest of the
+// browser.
+class Gamepads {
+ public:
+ static constexpr size_t kItemsLengthCap = 4;
+
+ // Gamepad data for N separate gamepad devices.
+ Gamepad items[kItemsLengthCap];
+};
+
+#pragma pack(pop)
+
+} // namespace device
+
+#endif // DEVICE_GAMEPAD_PUBLIC_CPP_GAMEPADS_H_
« no previous file with comments | « device/gamepad/public/cpp/gamepad.cc ('k') | device/gamepad/public/interfaces/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698