Chromium Code Reviews| Index: Source/modules/gamepad/WebKitGamepadList.h |
| diff --git a/Source/modules/gamepad/WebKitGamepadList.h b/Source/modules/gamepad/WebKitGamepadList.h |
| index 574998ebdd6c65ed45ea86b2642878618ef07832..9651d4dd6d7bd58c83c3ac64ff55603c5e387bc0 100644 |
| --- a/Source/modules/gamepad/WebKitGamepadList.h |
| +++ b/Source/modules/gamepad/WebKitGamepadList.h |
| @@ -6,29 +6,26 @@ |
| #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 07:08:50
As I commented, please keep the trace() method and
Nils Barth (inactive)
2014/03/13 07:36:14
Got it.
|
| private: |
| WebKitGamepadList() |
| { |
| + // FIXME: don't call ScriptWrappable::init twice |
| + // Instead, factor out a base class GamepadListCommon |
| ScriptWrappable::init(this); |
| } |