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

Side by Side Diff: Source/modules/gamepad/NavigatorGamepad.h

Issue 806993002: Removed deprecated navigator.webkitGetGamepads. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Missed one layout test expectations update Created 6 years 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
« no previous file with comments | « Source/modules/gamepad/GamepadCommon.cpp ('k') | Source/modules/gamepad/NavigatorGamepad.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 22 matching lines...) Expand all
33 #include "platform/Supplementable.h" 33 #include "platform/Supplementable.h"
34 #include "platform/heap/Handle.h" 34 #include "platform/heap/Handle.h"
35 #include "public/platform/WebGamepads.h" 35 #include "public/platform/WebGamepads.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 class Document; 39 class Document;
40 class Gamepad; 40 class Gamepad;
41 class GamepadList; 41 class GamepadList;
42 class Navigator; 42 class Navigator;
43 class WebKitGamepadList;
44 43
45 class NavigatorGamepad final : public NoBaseWillBeGarbageCollectedFinalized<Navi gatorGamepad>, public WillBeHeapSupplement<Navigator>, public DOMWindowProperty, public PlatformEventController, public DOMWindowLifecycleObserver { 44 class NavigatorGamepad final : public NoBaseWillBeGarbageCollectedFinalized<Navi gatorGamepad>, public WillBeHeapSupplement<Navigator>, public DOMWindowProperty, public PlatformEventController, public DOMWindowLifecycleObserver {
46 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NavigatorGamepad); 45 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NavigatorGamepad);
47 public: 46 public:
48 static NavigatorGamepad* from(Document&); 47 static NavigatorGamepad* from(Document&);
49 static NavigatorGamepad& from(Navigator&); 48 static NavigatorGamepad& from(Navigator&);
50 virtual ~NavigatorGamepad(); 49 virtual ~NavigatorGamepad();
51 50
52 static WebKitGamepadList* webkitGetGamepads(Navigator&);
53 static GamepadList* getGamepads(Navigator&); 51 static GamepadList* getGamepads(Navigator&);
54
55 WebKitGamepadList* webkitGamepads();
56 GamepadList* gamepads(); 52 GamepadList* gamepads();
57 53
58 virtual void trace(Visitor*); 54 virtual void trace(Visitor*);
59 55
60 void didConnectOrDisconnectGamepad(unsigned index, const WebGamepad&, bool c onnected); 56 void didConnectOrDisconnectGamepad(unsigned index, const WebGamepad&, bool c onnected);
61 57
62 private: 58 private:
63 explicit NavigatorGamepad(LocalFrame*); 59 explicit NavigatorGamepad(LocalFrame*);
64 60
65 static const char* supplementName(); 61 static const char* supplementName();
(...skipping 11 matching lines...) Expand all
77 virtual bool hasLastData() override; 73 virtual bool hasLastData() override;
78 virtual void didUpdateData() override; 74 virtual void didUpdateData() override;
79 virtual void pageVisibilityChanged() override; 75 virtual void pageVisibilityChanged() override;
80 76
81 // DOMWindowLifecycleObserver 77 // DOMWindowLifecycleObserver
82 virtual void didAddEventListener(LocalDOMWindow*, const AtomicString&) overr ide; 78 virtual void didAddEventListener(LocalDOMWindow*, const AtomicString&) overr ide;
83 virtual void didRemoveEventListener(LocalDOMWindow*, const AtomicString&) ov erride; 79 virtual void didRemoveEventListener(LocalDOMWindow*, const AtomicString&) ov erride;
84 virtual void didRemoveAllEventListeners(LocalDOMWindow*) override; 80 virtual void didRemoveAllEventListeners(LocalDOMWindow*) override;
85 81
86 PersistentWillBeMember<GamepadList> m_gamepads; 82 PersistentWillBeMember<GamepadList> m_gamepads;
87 PersistentWillBeMember<WebKitGamepadList> m_webkitGamepads;
88 PersistentHeapDequeWillBeHeapDeque<Member<Gamepad> > m_pendingEvents; 83 PersistentHeapDequeWillBeHeapDeque<Member<Gamepad> > m_pendingEvents;
89 AsyncMethodRunner<NavigatorGamepad> m_dispatchOneEventRunner; 84 AsyncMethodRunner<NavigatorGamepad> m_dispatchOneEventRunner;
90 }; 85 };
91 86
92 } // namespace blink 87 } // namespace blink
93 88
94 #endif // NavigatorGamepad_h 89 #endif // NavigatorGamepad_h
OLDNEW
« no previous file with comments | « Source/modules/gamepad/GamepadCommon.cpp ('k') | Source/modules/gamepad/NavigatorGamepad.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698