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

Side by Side Diff: public/platform/WebGamepads.h

Issue 200783002: Gamepad API: add support for gamepadconnected and gamepaddisconnected events (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: address comments Created 6 years, 9 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) 2011, Google Inc. All rights reserved. 1 // Copyright (C) 2011, Google Inc. All rights reserved.
2 // 2 //
3 // Redistribution and use in source and binary forms, with or without 3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are met: 4 // modification, are permitted provided that the following conditions are met:
5 // 5 //
6 // 1. Redistributions of source code must retain the above copyright 6 // 1. Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // 2. Redistributions in binary form must reproduce the above copyright 8 // 2. Redistributions in binary form must reproduce the above copyright
9 // notice, this list of conditions and the following disclaimer in the 9 // notice, this list of conditions and the following disclaimer in the
10 // documentation and/or other materials provided with the distribution. 10 // documentation and/or other materials provided with the distribution.
(...skipping 12 matching lines...) Expand all
23 23
24 #ifndef WebGamepads_h 24 #ifndef WebGamepads_h
25 #define WebGamepads_h 25 #define WebGamepads_h
26 26
27 #include "WebGamepad.h" 27 #include "WebGamepad.h"
28 28
29 #if BLINK_IMPLEMENTATION 29 #if BLINK_IMPLEMENTATION
30 #include "wtf/Assertions.h" 30 #include "wtf/Assertions.h"
31 #endif 31 #endif
32 32
33 #pragma pack(push, 1)
34
33 namespace blink { 35 namespace blink {
34 36
35 #pragma pack(push, 1)
36
37 // This structure is intentionally POD and fixed size so that it can be stored 37 // This structure is intentionally POD and fixed size so that it can be stored
38 // in shared memory between hardware polling threads and the rest of the 38 // in shared memory between hardware polling threads and the rest of the
39 // browser. 39 // browser.
40 class WebGamepads { 40 class WebGamepads {
41 public: 41 public:
42 WebGamepads() 42 WebGamepads()
43 : length(0) { } 43 : length(0) { }
44 44
45 static const size_t itemsLengthCap = 4; 45 static const size_t itemsLengthCap = 4;
46 46
(...skipping 10 matching lines...) Expand all
57 #else 57 #else
58 COMPILE_ASSERT(sizeof(WebGamepads) == 1864, WebGamepads_has_wrong_size); 58 COMPILE_ASSERT(sizeof(WebGamepads) == 1864, WebGamepads_has_wrong_size);
59 #endif 59 #endif
60 #endif 60 #endif
61 61
62 #pragma pack(pop) 62 #pragma pack(pop)
63 63
64 } 64 }
65 65
66 #endif // WebGamepads_h 66 #endif // WebGamepads_h
OLDNEW
« Source/modules/gamepad/NavigatorGamepad.cpp ('K') | « public/platform/WebGamepadListener.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698