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

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

Issue 2646383002: Use a new Supplement constructor for (Worker)Navigator supplements (Closed)
Patch Set: temp Created 3 years, 11 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 unified diff | Download patch
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 static GamepadList* getGamepads(Navigator&); 59 static GamepadList* getGamepads(Navigator&);
60 GamepadList* gamepads(); 60 GamepadList* gamepads();
61 61
62 DECLARE_VIRTUAL_TRACE(); 62 DECLARE_VIRTUAL_TRACE();
63 63
64 void didConnectOrDisconnectGamepad(unsigned index, 64 void didConnectOrDisconnectGamepad(unsigned index,
65 const WebGamepad&, 65 const WebGamepad&,
66 bool connected); 66 bool connected);
67 67
68 private: 68 private:
69 explicit NavigatorGamepad(LocalFrame*); 69 explicit NavigatorGamepad(Navigator&);
70 70
71 static const char* supplementName(); 71 static const char* supplementName();
72 72
73 void dispatchOneEvent(); 73 void dispatchOneEvent();
74 void didRemoveGamepadEventListeners(); 74 void didRemoveGamepadEventListeners();
75 bool startUpdatingIfAttached(); 75 bool startUpdatingIfAttached();
76 76
77 // ContextLifecycleObserver and PageVisibilityObserver 77 // ContextLifecycleObserver and PageVisibilityObserver
78 void contextDestroyed(ExecutionContext*) override; 78 void contextDestroyed(ExecutionContext*) override;
79 void pageVisibilityChanged() override; 79 void pageVisibilityChanged() override;
(...skipping 10 matching lines...) Expand all
90 void didRemoveAllEventListeners(LocalDOMWindow*) override; 90 void didRemoveAllEventListeners(LocalDOMWindow*) override;
91 91
92 Member<GamepadList> m_gamepads; 92 Member<GamepadList> m_gamepads;
93 HeapDeque<Member<Gamepad>> m_pendingEvents; 93 HeapDeque<Member<Gamepad>> m_pendingEvents;
94 Member<AsyncMethodRunner<NavigatorGamepad>> m_dispatchOneEventRunner; 94 Member<AsyncMethodRunner<NavigatorGamepad>> m_dispatchOneEventRunner;
95 }; 95 };
96 96
97 } // namespace blink 97 } // namespace blink
98 98
99 #endif // NavigatorGamepad_h 99 #endif // NavigatorGamepad_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698