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

Side by Side Diff: third_party/WebKit/Source/modules/gamepad/GamepadButton.h

Issue 2150173002: Added Touched attribute to GamepadButton (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Actually remove unnecessary test. Not sure what happened last time. Created 4 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 GamepadButton_h 5 #ifndef GamepadButton_h
6 #define GamepadButton_h 6 #define GamepadButton_h
7 7
8 #include "bindings/core/v8/ScriptWrappable.h" 8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
10 #include "wtf/Vector.h" 10 #include "wtf/Vector.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class GamepadButton final : public GarbageCollected<GamepadButton>, public Scrip tWrappable { 14 class GamepadButton final : public GarbageCollected<GamepadButton>, public Scrip tWrappable {
15 DEFINE_WRAPPERTYPEINFO(); 15 DEFINE_WRAPPERTYPEINFO();
16 public: 16 public:
17 static GamepadButton* create(); 17 static GamepadButton* create();
18 18
19 double value() const { return m_value; } 19 double value() const { return m_value; }
20 void setValue(double val) { m_value = val; } 20 void setValue(double val) { m_value = val; }
21 21
22 bool pressed() const { return m_pressed; } 22 bool pressed() const { return m_pressed; }
23 void setPressed(bool val) { m_pressed = val; } 23 void setPressed(bool val) { m_pressed = val; }
24 24
25 bool touched() const { return m_touched; }
26 void setTouched(bool val) { m_touched = val; }
27
25 DEFINE_INLINE_TRACE() { } 28 DEFINE_INLINE_TRACE() { }
26 29
27 private: 30 private:
28 GamepadButton(); 31 GamepadButton();
29 double m_value; 32 double m_value;
30 bool m_pressed; 33 bool m_pressed;
34 bool m_touched;
31 }; 35 };
32 36
33 typedef HeapVector<Member<GamepadButton>> GamepadButtonVector; 37 typedef HeapVector<Member<GamepadButton>> GamepadButtonVector;
34 38
35 } // namespace blink 39 } // namespace blink
36 40
37 #endif // GamepadButton_h 41 #endif // GamepadButton_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/gamepad/Gamepad.cpp ('k') | third_party/WebKit/Source/modules/gamepad/GamepadButton.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698