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

Side by Side Diff: Source/bindings/core/v8/ScriptDebugServer.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) 2010, Google Inc. All rights reserved. 2 * Copyright (c) 2010, 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 class CORE_EXPORT ScriptDebugServer : public NoBaseWillBeGarbageCollectedFinaliz ed<ScriptDebugServer> { 50 class CORE_EXPORT ScriptDebugServer : public NoBaseWillBeGarbageCollectedFinaliz ed<ScriptDebugServer> {
51 WTF_MAKE_NONCOPYABLE(ScriptDebugServer); 51 WTF_MAKE_NONCOPYABLE(ScriptDebugServer);
52 public: 52 public:
53 virtual ~ScriptDebugServer(); 53 virtual ~ScriptDebugServer();
54 DECLARE_VIRTUAL_TRACE(); 54 DECLARE_VIRTUAL_TRACE();
55 55
56 class Client { 56 class Client {
57 public: 57 public:
58 virtual ~Client() { } 58 virtual ~Client() { }
59 virtual v8::Local<v8::Object> compileDebuggerScript() = 0; 59 virtual v8::Local<v8::Object> compileDebuggerScript() = 0;
60 virtual ScriptDebugListener* getDebugListenerForContext(v8::Local<v8::Co ntext>) = 0;
61 virtual void runMessageLoopOnPause(v8::Local<v8::Context>) = 0;
62 virtual void quitMessageLoopOnPause() = 0;
60 }; 63 };
61 64
62 void enable(); 65 void enable();
63 void disable(); 66 void disable();
64 bool enabled() const; 67 bool enabled() const;
65 68
66 static void setContextDebugData(v8::Local<v8::Context>, const String& contex tDebugData); 69 static void setContextDebugData(v8::Local<v8::Context>, const String& contex tDebugData);
67 // Each script inherits debug data from v8::Context where it has been compil ed. 70 // Each script inherits debug data from v8::Context where it has been compil ed.
68 // Only scripts whose debug data contains |contextDebugDataSubstring| substr ing will be reported. 71 // Only scripts whose debug data contains |contextDebugDataSubstring| substr ing will be reported.
69 // Passing empty string will result in reporting all scripts. 72 // Passing empty string will result in reporting all scripts.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 114
112 bool isPaused(); 115 bool isPaused();
113 116
114 v8::Local<v8::Value> functionScopes(v8::Local<v8::Function>); 117 v8::Local<v8::Value> functionScopes(v8::Local<v8::Function>);
115 v8::Local<v8::Value> generatorObjectDetails(v8::Local<v8::Object>&); 118 v8::Local<v8::Value> generatorObjectDetails(v8::Local<v8::Object>&);
116 v8::Local<v8::Value> collectionEntries(v8::Local<v8::Object>&); 119 v8::Local<v8::Value> collectionEntries(v8::Local<v8::Object>&);
117 v8::Local<v8::Value> getInternalProperties(v8::Local<v8::Object>&); 120 v8::Local<v8::Value> getInternalProperties(v8::Local<v8::Object>&);
118 v8::MaybeLocal<v8::Value> setFunctionVariableValue(v8::Local<v8::Value> func tionValue, int scopeNumber, const String& variableName, v8::Local<v8::Value> new Value); 121 v8::MaybeLocal<v8::Value> setFunctionVariableValue(v8::Local<v8::Value> func tionValue, int scopeNumber, const String& variableName, v8::Local<v8::Value> new Value);
119 122
120 v8::Isolate* isolate() const { return m_isolate; } 123 v8::Isolate* isolate() const { return m_isolate; }
121 124 explicit ScriptDebugServer(v8::Isolate*, PassOwnPtr<Client>);
122 protected:
123 ScriptDebugServer(v8::Isolate*, PassOwnPtr<Client>);
124
125 virtual ScriptDebugListener* getDebugListenerForContext(v8::Local<v8::Contex t>) = 0;
126 virtual void runMessageLoopOnPause(v8::Local<v8::Context>) = 0;
127 virtual void quitMessageLoopOnPause() = 0;
128 125
129 private: 126 private:
130 void ensureDebuggerScriptCompiled(); 127 void ensureDebuggerScriptCompiled();
131 v8::MaybeLocal<v8::Value> callDebuggerMethod(const char* functionName, int a rgc, v8::Local<v8::Value> argv[]); 128 v8::MaybeLocal<v8::Value> callDebuggerMethod(const char* functionName, int a rgc, v8::Local<v8::Value> argv[]);
132 v8::Local<v8::Object> debuggerScriptLocal() const; 129 v8::Local<v8::Object> debuggerScriptLocal() const;
133 void clearBreakpoints(); 130 void clearBreakpoints();
134 131
135 void dispatchDidParseSource(ScriptDebugListener*, v8::Local<v8::Object> sour ceObject, CompileResult); 132 void dispatchDidParseSource(ScriptDebugListener*, v8::Local<v8::Object> sour ceObject, CompileResult);
136 133
137 static void breakProgramCallback(const v8::FunctionCallbackInfo<v8::Value>&) ; 134 static void breakProgramCallback(const v8::FunctionCallbackInfo<v8::Value>&) ;
(...skipping 24 matching lines...) Expand all
162 RefPtr<ScriptState> m_pausedScriptState; 159 RefPtr<ScriptState> m_pausedScriptState;
163 bool m_runningNestedMessageLoop; 160 bool m_runningNestedMessageLoop;
164 class ThreadSafeTaskQueue; 161 class ThreadSafeTaskQueue;
165 OwnPtr<ThreadSafeTaskQueue> m_taskQueue; 162 OwnPtr<ThreadSafeTaskQueue> m_taskQueue;
166 }; 163 };
167 164
168 } // namespace blink 165 } // namespace blink
169 166
170 167
171 #endif // ScriptDebugServer_h 168 #endif // ScriptDebugServer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698