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

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

Issue 1101263003: Oilpan: have Navigator and its supplements be on the heap by default. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 5 years, 8 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 | Annotate | Revision Log
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 24 matching lines...) Expand all
35 #include "platform/heap/Handle.h" 35 #include "platform/heap/Handle.h"
36 #include "public/platform/WebGamepads.h" 36 #include "public/platform/WebGamepads.h"
37 37
38 namespace blink { 38 namespace blink {
39 39
40 class Document; 40 class Document;
41 class Gamepad; 41 class Gamepad;
42 class GamepadList; 42 class GamepadList;
43 class Navigator; 43 class Navigator;
44 44
45 class MODULES_EXPORT NavigatorGamepad final : public NoBaseWillBeGarbageCollecte dFinalized<NavigatorGamepad>, public WillBeHeapSupplement<Navigator>, public DOM WindowProperty, public PlatformEventController, public DOMWindowLifecycleObserve r { 45 // TODO(Oilpan): when ~DOMWindowProperty is removed, derive from GarbageCollecte d<> instead.
haraken 2015/04/24 15:32:36 Can we move these comments to DOMWindowProperty an
sof 2015/04/24 21:25:08 Done; I considered some time ago adding DOMWindowP
46 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NavigatorGamepad); 46 class MODULES_EXPORT NavigatorGamepad final : public GarbageCollectedFinalized<N avigatorGamepad>, public HeapSupplement<Navigator>, DOMWindowProperty, public Pl atformEventController, public DOMWindowLifecycleObserver {
47 USING_GARBAGE_COLLECTED_MIXIN(NavigatorGamepad);
47 public: 48 public:
48 static NavigatorGamepad* from(Document&); 49 static NavigatorGamepad* from(Document&);
49 static NavigatorGamepad& from(Navigator&); 50 static NavigatorGamepad& from(Navigator&);
50 virtual ~NavigatorGamepad(); 51 virtual ~NavigatorGamepad();
51 52
52 static GamepadList* getGamepads(Navigator&); 53 static GamepadList* getGamepads(Navigator&);
53 GamepadList* gamepads(); 54 GamepadList* gamepads();
54 55
55 DECLARE_VIRTUAL_TRACE(); 56 DECLARE_VIRTUAL_TRACE();
56 57
(...skipping 17 matching lines...) Expand all
74 virtual void unregisterWithDispatcher() override; 75 virtual void unregisterWithDispatcher() override;
75 virtual bool hasLastData() override; 76 virtual bool hasLastData() override;
76 virtual void didUpdateData() override; 77 virtual void didUpdateData() override;
77 virtual void pageVisibilityChanged() override; 78 virtual void pageVisibilityChanged() override;
78 79
79 // DOMWindowLifecycleObserver 80 // DOMWindowLifecycleObserver
80 virtual void didAddEventListener(LocalDOMWindow*, const AtomicString&) overr ide; 81 virtual void didAddEventListener(LocalDOMWindow*, const AtomicString&) overr ide;
81 virtual void didRemoveEventListener(LocalDOMWindow*, const AtomicString&) ov erride; 82 virtual void didRemoveEventListener(LocalDOMWindow*, const AtomicString&) ov erride;
82 virtual void didRemoveAllEventListeners(LocalDOMWindow*) override; 83 virtual void didRemoveAllEventListeners(LocalDOMWindow*) override;
83 84
84 PersistentWillBeMember<GamepadList> m_gamepads; 85 Member<GamepadList> m_gamepads;
85 PersistentHeapDequeWillBeHeapDeque<Member<Gamepad>> m_pendingEvents; 86 HeapDeque<Member<Gamepad>> m_pendingEvents;
86 AsyncMethodRunner<NavigatorGamepad> m_dispatchOneEventRunner; 87 AsyncMethodRunner<NavigatorGamepad> m_dispatchOneEventRunner;
haraken 2015/04/24 15:37:17 It seems that AsyncMethodRunner is not safe for la
sof 2015/04/24 15:40:10 You have looked at the comment next to AsyncMethod
haraken 2015/04/24 15:44:44 That is a different issue than the issue mentioned
sof 2015/04/24 15:55:13 Thanks, now I remember the non-local nature of thi
sof 2015/04/24 21:25:08 Addressing this one via https://codereview.chromiu
87 }; 88 };
88 89
89 } // namespace blink 90 } // namespace blink
90 91
91 #endif // NavigatorGamepad_h 92 #endif // NavigatorGamepad_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698