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

Side by Side Diff: third_party/WebKit/Source/core/dom/FrameRequestCallbackCollection.h

Issue 1406923009: Rename DISALLOW_ALLOCATION and ALLOW_ONLY_INLINE_ALLOCATION (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef FrameRequestCallbackCollection_h 5 #ifndef FrameRequestCallbackCollection_h
6 #define FrameRequestCallbackCollection_h 6 #define FrameRequestCallbackCollection_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class ExecutionContext; 13 class ExecutionContext;
14 class FrameRequestCallback; 14 class FrameRequestCallback;
15 15
16 class CORE_EXPORT FrameRequestCallbackCollection final { 16 class CORE_EXPORT FrameRequestCallbackCollection final {
17 DISALLOW_ALLOCATION(); 17 DISALLOW_NEW();
18 public: 18 public:
19 explicit FrameRequestCallbackCollection(ExecutionContext*); 19 explicit FrameRequestCallbackCollection(ExecutionContext*);
20 20
21 using CallbackId = int; 21 using CallbackId = int;
22 CallbackId registerCallback(FrameRequestCallback*); 22 CallbackId registerCallback(FrameRequestCallback*);
23 void cancelCallback(CallbackId); 23 void cancelCallback(CallbackId);
24 void executeCallbacks(double highResNowMs, double highResNowMsLegacy); 24 void executeCallbacks(double highResNowMs, double highResNowMsLegacy);
25 25
26 bool isEmpty() const { return !m_callbacks.size(); } 26 bool isEmpty() const { return !m_callbacks.size(); }
27 27
28 DECLARE_TRACE(); 28 DECLARE_TRACE();
29 29
30 private: 30 private:
31 using CallbackList = PersistentHeapVectorWillBeHeapVector<Member<FrameReques tCallback>>; 31 using CallbackList = PersistentHeapVectorWillBeHeapVector<Member<FrameReques tCallback>>;
32 CallbackList m_callbacks; 32 CallbackList m_callbacks;
33 CallbackList m_callbacksToInvoke; // only non-empty while inside executeCall backs 33 CallbackList m_callbacksToInvoke; // only non-empty while inside executeCall backs
34 34
35 CallbackId m_nextCallbackId = 0; 35 CallbackId m_nextCallbackId = 0;
36 36
37 RawPtrWillBeMember<ExecutionContext> m_context; 37 RawPtrWillBeMember<ExecutionContext> m_context;
38 }; 38 };
39 39
40 } // namespace blink 40 } // namespace blink
41 41
42 #endif // FrameRequestCallbackCollection_h 42 #endif // FrameRequestCallbackCollection_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/DocumentTiming.h ('k') | third_party/WebKit/Source/core/dom/IconURL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698