| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, Google Inc. All rights reserved. | 2 * Copyright (C) 2011, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are met: | 5 * modification, are permitted provided that the following conditions are met: |
| 6 * | 6 * |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #include "heap/Handle.h" | 29 #include "heap/Handle.h" |
| 30 #include "platform/Supplementable.h" | 30 #include "platform/Supplementable.h" |
| 31 #include "public/platform/WebGamepads.h" | 31 #include "public/platform/WebGamepads.h" |
| 32 | 32 |
| 33 namespace WebCore { | 33 namespace WebCore { |
| 34 | 34 |
| 35 class GamepadList; | 35 class GamepadList; |
| 36 class Navigator; | 36 class Navigator; |
| 37 class WebKitGamepadList; | 37 class WebKitGamepadList; |
| 38 | 38 |
| 39 class NavigatorGamepad FINAL : public Supplement<Navigator> { | 39 class NavigatorGamepad FINAL : public NoBaseWillBeGarbageCollectedFinalized<Navi
gatorGamepad>, public WillBeHeapSupplement<Navigator> { |
| 40 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NavigatorGamepad); |
| 40 public: | 41 public: |
| 41 virtual ~NavigatorGamepad(); | 42 virtual ~NavigatorGamepad(); |
| 42 static NavigatorGamepad& from(Navigator&); | 43 static NavigatorGamepad& from(Navigator&); |
| 43 | 44 |
| 44 static WebKitGamepadList* webkitGetGamepads(Navigator&); | 45 static WebKitGamepadList* webkitGetGamepads(Navigator&); |
| 45 static GamepadList* getGamepads(Navigator&); | 46 static GamepadList* getGamepads(Navigator&); |
| 46 | 47 |
| 47 WebKitGamepadList* webkitGamepads(); | 48 WebKitGamepadList* webkitGamepads(); |
| 48 GamepadList* gamepads(); | 49 GamepadList* gamepads(); |
| 49 | 50 |
| 51 virtual void trace(Visitor*); |
| 52 |
| 50 private: | 53 private: |
| 51 NavigatorGamepad(); | 54 NavigatorGamepad(); |
| 52 static const char* supplementName(); | 55 static const char* supplementName(); |
| 53 | 56 |
| 54 RefPtrWillBePersistent<GamepadList> m_gamepads; | 57 RefPtrWillBeMember<GamepadList> m_gamepads; |
| 55 RefPtrWillBePersistent<WebKitGamepadList> m_webkitGamepads; | 58 RefPtrWillBeMember<WebKitGamepadList> m_webkitGamepads; |
| 56 }; | 59 }; |
| 57 | 60 |
| 58 } // namespace WebCore | 61 } // namespace WebCore |
| 59 | 62 |
| 60 #endif // NavigatorGamepad_h | 63 #endif // NavigatorGamepad_h |
| OLD | NEW |