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

Side by Side Diff: Source/web/SuspendableScriptExecutor.h

Issue 1230533002: Fix virtual/override/final usage in Source/web/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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
« no previous file with comments | « Source/web/StorageQuotaClientImpl.h ('k') | Source/web/UserMediaClientImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 SuspendableScriptExecutor_h 5 #ifndef SuspendableScriptExecutor_h
6 #define SuspendableScriptExecutor_h 6 #define SuspendableScriptExecutor_h
7 7
8 #include "core/frame/SuspendableTimer.h" 8 #include "core/frame/SuspendableTimer.h"
9 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
10 #include "wtf/OwnPtr.h" 10 #include "wtf/OwnPtr.h"
11 #include "wtf/Vector.h" 11 #include "wtf/Vector.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class LocalFrame; 15 class LocalFrame;
16 class ScriptSourceCode; 16 class ScriptSourceCode;
17 class WebScriptExecutionCallback; 17 class WebScriptExecutionCallback;
18 18
19 class SuspendableScriptExecutor final : public RefCountedWillBeRefCountedGarbage Collected<SuspendableScriptExecutor>, public SuspendableTimer { 19 class SuspendableScriptExecutor final : public RefCountedWillBeRefCountedGarbage Collected<SuspendableScriptExecutor>, public SuspendableTimer {
20 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SuspendableScriptExecutor); 20 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SuspendableScriptExecutor);
21 public: 21 public:
22 static void createAndRun(LocalFrame*, int worldID, const WillBeHeapVector<Sc riptSourceCode>& sources, int extensionGroup, bool userGesture, WebScriptExecuti onCallback*); 22 static void createAndRun(LocalFrame*, int worldID, const WillBeHeapVector<Sc riptSourceCode>& sources, int extensionGroup, bool userGesture, WebScriptExecuti onCallback*);
23 virtual ~SuspendableScriptExecutor(); 23 ~SuspendableScriptExecutor() override;
24 24
25 virtual void contextDestroyed() override; 25 void contextDestroyed() override;
26 26
27 // Eager finalization is needed to promptly stop this timer object. 27 // Eager finalization is needed to promptly stop this timer object.
28 // (see DOMTimer comment for more.) 28 // (see DOMTimer comment for more.)
29 EAGERLY_FINALIZE(); 29 EAGERLY_FINALIZE();
30 DECLARE_VIRTUAL_TRACE(); 30 DECLARE_VIRTUAL_TRACE();
31 31
32 private: 32 private:
33 SuspendableScriptExecutor(LocalFrame*, int worldID, const WillBeHeapVector<S criptSourceCode>& sources, int extensionGroup, bool userGesture, WebScriptExecut ionCallback*); 33 SuspendableScriptExecutor(LocalFrame*, int worldID, const WillBeHeapVector<S criptSourceCode>& sources, int extensionGroup, bool userGesture, WebScriptExecut ionCallback*);
34 34
35 virtual void fired() override; 35 void fired() override;
36 36
37 void run(); 37 void run();
38 void executeAndDestroySelf(); 38 void executeAndDestroySelf();
39 void dispose(); 39 void dispose();
40 40
41 RefPtrWillBeMember<LocalFrame> m_frame; 41 RefPtrWillBeMember<LocalFrame> m_frame;
42 int m_worldID; 42 int m_worldID;
43 WillBeHeapVector<ScriptSourceCode> m_sources; 43 WillBeHeapVector<ScriptSourceCode> m_sources;
44 int m_extensionGroup; 44 int m_extensionGroup;
45 bool m_userGesture; 45 bool m_userGesture;
46 WebScriptExecutionCallback* m_callback; 46 WebScriptExecutionCallback* m_callback;
47 #if ENABLE(ASSERT) 47 #if ENABLE(ASSERT)
48 bool m_disposed; 48 bool m_disposed;
49 #endif 49 #endif
50 }; 50 };
51 51
52 } // namespace blink 52 } // namespace blink
53 53
54 #endif // SuspendableScriptExecutor_h 54 #endif // SuspendableScriptExecutor_h
OLDNEW
« no previous file with comments | « Source/web/StorageQuotaClientImpl.h ('k') | Source/web/UserMediaClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698