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

Side by Side Diff: Source/bindings/core/v8/PageScriptDebugServer.h

Issue 1128273005: Devtools: Move runMessageLoopOnPause and other methods on ScriptDebugServer::Client (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove empty line Created 5 years, 7 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 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 13 matching lines...) Expand all
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef PageScriptDebugServer_h 31 #ifndef PageScriptDebugServer_h
32 #define PageScriptDebugServer_h 32 #define PageScriptDebugServer_h
33 33
34 #include "bindings/core/v8/ScriptDebugServer.h"
35 #include "core/CoreExport.h" 34 #include "core/CoreExport.h"
35 #include "core/inspector/PerIsolateDebuggerClient.h"
36 #include <v8.h> 36 #include <v8.h>
37 37
38 namespace WTF { 38 namespace WTF {
39 class Mutex; 39 class Mutex;
40 } 40 }
41 41
42 namespace blink { 42 namespace blink {
43 43
44 class Page; 44 class Page;
45 45
46 class CORE_EXPORT PageScriptDebugServer final : public ScriptDebugServer { 46 class CORE_EXPORT PageScriptDebugServer final : public PerIsolateDebuggerClient {
47 WTF_MAKE_NONCOPYABLE(PageScriptDebugServer); 47 WTF_MAKE_NONCOPYABLE(PageScriptDebugServer);
48 public: 48 public:
49 class ClientMessageLoop { 49 class ClientMessageLoop {
50 public: 50 public:
51 virtual ~ClientMessageLoop() { } 51 virtual ~ClientMessageLoop() { }
52 virtual void run(LocalFrame*) = 0; 52 virtual void run(LocalFrame*) = 0;
53 virtual void quitNow() = 0; 53 virtual void quitNow() = 0;
54 }; 54 };
55 55
56 PageScriptDebugServer(PassOwnPtr<ClientMessageLoop>, v8::Isolate*); 56 PageScriptDebugServer(PassOwnPtr<ClientMessageLoop>, v8::Isolate*);
57 ~PageScriptDebugServer() override; 57 ~PageScriptDebugServer() override;
58 DECLARE_VIRTUAL_TRACE();
yurys 2015/05/08 10:59:15 This will likely need some work to fix Oilpan.
sergeyv 2015/05/08 13:59:14 Acknowledged.
59 58
60 static void setContextDebugData(v8::Local<v8::Context>, const String& type, int contextDebugId); 59 static void setContextDebugData(v8::Local<v8::Context>, const String& type, int contextDebugId);
61 void addListener(ScriptDebugListener*, LocalFrame*, int contextDebugId); 60 void addListener(ScriptDebugListener*, LocalFrame*, int contextDebugId);
62 void removeListener(ScriptDebugListener*, LocalFrame*); 61 void removeListener(ScriptDebugListener*, LocalFrame*);
63 62
64 static PageScriptDebugServer* instance(); 63 static PageScriptDebugServer* instance();
65 static void interruptMainThreadAndRun(PassOwnPtr<Task>); 64 static void interruptMainThreadAndRun(PassOwnPtr<ScriptDebugServer::Task>);
66 65
67 private:
yurys 2015/05/08 10:59:15 Please revert this. No need to make these methods
sergeyv 2015/05/08 13:59:14 Done.
68 ScriptDebugListener* getDebugListenerForContext(v8::Local<v8::Context>) over ride; 66 ScriptDebugListener* getDebugListenerForContext(v8::Local<v8::Context>) over ride;
69 void runMessageLoopOnPause(v8::Local<v8::Context>) override; 67 void runMessageLoopOnPause(v8::Local<v8::Context>) override;
70 void quitMessageLoopOnPause() override; 68 void quitMessageLoopOnPause() override;
69
70 private:
71 static WTF::Mutex& creationMutex(); 71 static WTF::Mutex& creationMutex();
72 72
73 using ListenersMap = WillBeHeapHashMap<RawPtrWillBeMember<LocalFrame>, Scrip tDebugListener*>; 73 using ListenersMap = WillBeHeapHashMap<RawPtrWillBeMember<LocalFrame>, Scrip tDebugListener*>;
74 ListenersMap m_listenersMap; 74 ListenersMap m_listenersMap;
75 OwnPtr<ClientMessageLoop> m_clientMessageLoop; 75 OwnPtr<ClientMessageLoop> m_clientMessageLoop;
76 RawPtrWillBeMember<LocalFrame> m_pausedFrame; 76 RawPtrWillBeMember<LocalFrame> m_pausedFrame;
77 77
78 static PageScriptDebugServer* s_instance; 78 static PageScriptDebugServer* s_instance;
79 }; 79 };
80 80
81 } // namespace blink 81 } // namespace blink
82 82
83 83
84 #endif // PageScriptDebugServer_h 84 #endif // PageScriptDebugServer_h
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/core/v8/PageScriptDebugServer.cpp » ('j') | Source/bindings/core/v8/WorkerScriptDebugServer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698