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

Unified Diff: Source/modules/gamepad/WebKitGamepadList.h

Issue 195993007: Factor out GamepadCommon base class from Gamepad and WebKitGamepad (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Revised 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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/gamepad/WebKitGamepadList.h
diff --git a/Source/modules/gamepad/WebKitGamepadList.h b/Source/modules/gamepad/WebKitGamepadList.h
index 574998ebdd6c65ed45ea86b2642878618ef07832..87a341c8e1d690b945b119337e430a6974c8c957 100644
--- a/Source/modules/gamepad/WebKitGamepadList.h
+++ b/Source/modules/gamepad/WebKitGamepadList.h
@@ -7,6 +7,7 @@
#include "bindings/v8/ScriptWrappable.h"
#include "heap/Handle.h"
+#include "modules/gamepad/Gamepad.h"
#include "modules/gamepad/WebKitGamepad.h"
#include "public/platform/WebGamepads.h"
#include "wtf/PassRefPtr.h"
@@ -15,23 +16,22 @@
namespace WebCore {
-class WebKitGamepadList : public RefCountedWillBeGarbageCollectedFinalized<WebKitGamepadList>, public ScriptWrappable {
+class WebKitGamepadList FINAL : public RefCountedWillBeGarbageCollectedFinalized<WebKitGamepadList>, public ScriptWrappable {
public:
- static PassRefPtrWillBeRawPtr<WebKitGamepadList> create() { return adoptRefWillBeNoop(new WebKitGamepadList); }
- ~WebKitGamepadList();
+ static PassRefPtrWillBeRawPtr<WebKitGamepadList> create()
+ {
+ return adoptRefWillBeNoop(new WebKitGamepadList);
+ }
+ ~WebKitGamepadList() { }
zerny-chromium 2014/03/13 09:48:00 Nit: keep the impl in cpp file
void set(unsigned index, PassRefPtrWillBeRawPtr<WebKitGamepad>);
WebKitGamepad* item(unsigned index);
- unsigned length() const;
+ unsigned length() const { return blink::WebGamepads::itemsLengthCap; }
void trace(Visitor*);
private:
- WebKitGamepadList()
- {
- ScriptWrappable::init(this);
- }
-
+ WebKitGamepadList() { ScriptWrappable::init(this); }
RefPtrWillBeMember<WebKitGamepad> m_items[blink::WebGamepads::itemsLengthCap];
};

Powered by Google App Engine
This is Rietveld 408576698