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

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

Issue 868023003: Never (re)start NavigatorGamepad platform event updating once detached. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
« no previous file with comments | « LayoutTests/TestExpectations ('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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 void didConnectOrDisconnectGamepad(unsigned index, const WebGamepad&, bool c onnected); 56 void didConnectOrDisconnectGamepad(unsigned index, const WebGamepad&, bool c onnected);
57 57
58 private: 58 private:
59 explicit NavigatorGamepad(LocalFrame*); 59 explicit NavigatorGamepad(LocalFrame*);
60 60
61 static const char* supplementName(); 61 static const char* supplementName();
62 62
63 void dispatchOneEvent(); 63 void dispatchOneEvent();
64 void didRemoveGamepadEventListeners(); 64 void didRemoveGamepadEventListeners();
65 bool startUpdatingIfAttached();
65 66
66 // DOMWindowProperty 67 // DOMWindowProperty
67 virtual void willDestroyGlobalObjectInFrame() override; 68 virtual void willDestroyGlobalObjectInFrame() override;
68 virtual void willDetachGlobalObjectFromFrame() override; 69 virtual void willDetachGlobalObjectFromFrame() override;
69 70
70 // PlatformEventController 71 // PlatformEventController
71 virtual void registerWithDispatcher() override; 72 virtual void registerWithDispatcher() override;
72 virtual void unregisterWithDispatcher() override; 73 virtual void unregisterWithDispatcher() override;
73 virtual bool hasLastData() override; 74 virtual bool hasLastData() override;
74 virtual void didUpdateData() override; 75 virtual void didUpdateData() override;
75 virtual void pageVisibilityChanged() override; 76 virtual void pageVisibilityChanged() override;
76 77
77 // DOMWindowLifecycleObserver 78 // DOMWindowLifecycleObserver
78 virtual void didAddEventListener(LocalDOMWindow*, const AtomicString&) overr ide; 79 virtual void didAddEventListener(LocalDOMWindow*, const AtomicString&) overr ide;
79 virtual void didRemoveEventListener(LocalDOMWindow*, const AtomicString&) ov erride; 80 virtual void didRemoveEventListener(LocalDOMWindow*, const AtomicString&) ov erride;
80 virtual void didRemoveAllEventListeners(LocalDOMWindow*) override; 81 virtual void didRemoveAllEventListeners(LocalDOMWindow*) override;
81 82
82 PersistentWillBeMember<GamepadList> m_gamepads; 83 PersistentWillBeMember<GamepadList> m_gamepads;
83 PersistentHeapDequeWillBeHeapDeque<Member<Gamepad>> m_pendingEvents; 84 PersistentHeapDequeWillBeHeapDeque<Member<Gamepad>> m_pendingEvents;
84 AsyncMethodRunner<NavigatorGamepad> m_dispatchOneEventRunner; 85 AsyncMethodRunner<NavigatorGamepad> m_dispatchOneEventRunner;
85 }; 86 };
86 87
87 } // namespace blink 88 } // namespace blink
88 89
89 #endif // NavigatorGamepad_h 90 #endif // NavigatorGamepad_h
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | Source/modules/gamepad/NavigatorGamepad.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698