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

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: Cleaned up 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..4413f493e7afad0389ec645a0c856df57b22a595 100644
--- a/Source/modules/gamepad/WebKitGamepadList.h
+++ b/Source/modules/gamepad/WebKitGamepadList.h
@@ -6,25 +6,20 @@
#define WebKitGamepadList_h
#include "bindings/v8/ScriptWrappable.h"
-#include "heap/Handle.h"
+#include "modules/gamepad/GamepadList.h"
#include "modules/gamepad/WebKitGamepad.h"
-#include "public/platform/WebGamepads.h"
#include "wtf/PassRefPtr.h"
-#include "wtf/RefCounted.h"
-#include "wtf/Vector.h"
namespace WebCore {
-class WebKitGamepadList : public RefCountedWillBeGarbageCollectedFinalized<WebKitGamepadList>, public ScriptWrappable {
+// Inherit from concrete GamepadList class (instead of factoring out an abstract
+// GamepadListCommon class) so GamepadList is simple (unfactored) and low-cruft.
+class WebKitGamepadList : public GamepadList {
public:
static PassRefPtrWillBeRawPtr<WebKitGamepadList> create() { return adoptRefWillBeNoop(new WebKitGamepadList); }
- ~WebKitGamepadList();
void set(unsigned index, PassRefPtrWillBeRawPtr<WebKitGamepad>);
WebKitGamepad* item(unsigned index);
- unsigned length() const;
-
- void trace(Visitor*);
haraken 2014/03/13 06:29:39 You cannot remove trace(). The following trace() i
Nils Barth (inactive) 2014/03/13 06:42:21 ? Why is this necessary? Can't it use trace() in t
kouhei (in TOK) 2014/03/13 06:47:09 It's an oilpan rule to have trace on every class i
Nils Barth (inactive) 2014/03/13 06:58:42 Thanks! https://docs.google.com/document/d/1y7_0ni
private:
WebKitGamepadList()

Powered by Google App Engine
This is Rietveld 408576698