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

Side by Side Diff: Source/core/inspector/InspectorTaskRunner.h

Issue 1177623006: Componentization: make InspectorTaskRunner::IgnoreInterruptsScope visible for WebDevToolsAgentImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 InspectorTaskRunner_h 5 #ifndef InspectorTaskRunner_h
6 #define InspectorTaskRunner_h 6 #define InspectorTaskRunner_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "wtf/Forward.h" 9 #include "wtf/Forward.h"
10 #include "wtf/Noncopyable.h" 10 #include "wtf/Noncopyable.h"
(...skipping 12 matching lines...) Expand all
23 class Task { 23 class Task {
24 public: 24 public:
25 virtual ~Task() { } 25 virtual ~Task() { }
26 virtual void run() = 0; 26 virtual void run() = 0;
27 }; 27 };
28 // This method can be called on any thread. It is caller's responsibility to make sure that 28 // This method can be called on any thread. It is caller's responsibility to make sure that
29 // this V8Debugger and corresponding v8::Isolate exist while this method is running. 29 // this V8Debugger and corresponding v8::Isolate exist while this method is running.
30 void interruptAndRun(PassOwnPtr<Task>); 30 void interruptAndRun(PassOwnPtr<Task>);
31 void runPendingTasks(); 31 void runPendingTasks();
32 32
33 class IgnoreInterruptsScope final { 33 class CORE_EXPORT IgnoreInterruptsScope final {
34 public: 34 public:
35 explicit IgnoreInterruptsScope(InspectorTaskRunner*); 35 explicit IgnoreInterruptsScope(InspectorTaskRunner*);
36 ~IgnoreInterruptsScope(); 36 ~IgnoreInterruptsScope();
37 37
38 private: 38 private:
39 bool m_wasIgnoring; 39 bool m_wasIgnoring;
40 InspectorTaskRunner* m_taskRunner; 40 InspectorTaskRunner* m_taskRunner;
41 }; 41 };
42 42
43 private: 43 private:
44 static void v8InterruptCallback(v8::Isolate*, void* data); 44 static void v8InterruptCallback(v8::Isolate*, void* data);
45 45
46 v8::Isolate* m_isolate; 46 v8::Isolate* m_isolate;
47 class ThreadSafeTaskQueue; 47 class ThreadSafeTaskQueue;
48 OwnPtr<ThreadSafeTaskQueue> m_taskQueue; 48 OwnPtr<ThreadSafeTaskQueue> m_taskQueue;
49 bool m_ignoreInterrupts; 49 bool m_ignoreInterrupts;
50 }; 50 };
51 51
52 } // namespace blink 52 } // namespace blink
53 53
54 54
55 #endif // !defined(InspectorTaskRunner_h) 55 #endif // !defined(InspectorTaskRunner_h)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698