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

Side by Side Diff: sky/engine/v8_inspector/PageScriptDebugServer.h

Issue 922053002: Remove unused V8 integration code in Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2011 Google Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above
11 * copyright notice, this list of conditions and the following disclaimer
12 * in the documentation and/or other materials provided with the
13 * distribution.
14 * * Neither the name of Google Inc. nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
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.
29 */
30
31 #ifndef SKY_ENGINE_V8_INSPECTOR_PAGESCRIPTDEBUGSERVER_H_
32 #define SKY_ENGINE_V8_INSPECTOR_PAGESCRIPTDEBUGSERVER_H_
33
34 #include "sky/engine/v8_inspector/ScriptDebugServer.h"
35 #include "sky/engine/wtf/Forward.h"
36 #include "sky/engine/wtf/RefCounted.h"
37 #include "v8/include/v8.h"
38
39 // This whole file will move to namespace inspector.
40 namespace inspector {
41 class InspectorHost;
42 }
43
44 namespace blink {
45
46 class ScriptController;
47 class ScriptSourceCode;
48
49 class PageScriptDebugServer final : public ScriptDebugServer {
50 WTF_MAKE_NONCOPYABLE(PageScriptDebugServer);
51 public:
52 static PageScriptDebugServer& shared();
53
54 static void setMainThreadIsolate(v8::Isolate*);
55
56 void addListener(ScriptDebugListener*, inspector::InspectorHost*);
57 void removeListener(ScriptDebugListener*, inspector::InspectorHost*);
58
59 static void interruptAndRun(PassOwnPtr<Task>);
60
61 class ClientMessageLoop {
62 public:
63 virtual ~ClientMessageLoop() { }
64 virtual void run(inspector::InspectorHost*) = 0;
65 virtual void quitNow() = 0;
66 };
67 void setClientMessageLoop(PassOwnPtr<ClientMessageLoop>);
68
69 class InspectorHostResolver {
70 public:
71 virtual ~InspectorHostResolver() { }
72 virtual inspector::InspectorHost* inspectorHostFor(v8::Handle<v8::Contex t>) = 0;
73 };
74 void setInspectorHostResolver(PassOwnPtr<InspectorHostResolver>);
75
76 virtual void compileScript(ScriptState*, const String& expression, const Str ing& sourceURL, String* scriptId, String* exceptionDetailsText, int* lineNumber, int* columnNumber, RefPtr<ScriptCallStack>* stackTrace) override;
77 virtual void clearCompiledScripts() override;
78 virtual void runScript(ScriptState*, const String& scriptId, ScriptValue* re sult, bool* wasThrown, String* exceptionDetailsText, int* lineNumber, int* colum nNumber, RefPtr<ScriptCallStack>* stackTrace) override;
79
80 private:
81 PageScriptDebugServer();
82 virtual ~PageScriptDebugServer();
83
84 virtual ScriptDebugListener* getDebugListenerForContext(v8::Handle<v8::Conte xt>) override;
85 virtual void runMessageLoopOnPause(v8::Handle<v8::Context>) override;
86 virtual void quitMessageLoopOnPause() override;
87
88 typedef HashMap<inspector::InspectorHost*, ScriptDebugListener*> ListenersMa p;
89 ListenersMap m_listenersMap;
90 OwnPtr<ClientMessageLoop> m_clientMessageLoop;
91 OwnPtr<InspectorHostResolver> m_inspectorHostResolver;
92 inspector::InspectorHost* m_pausedHost;
93 HashMap<String, String> m_compiledScriptURLs;
94
95 static v8::Isolate* s_mainThreadIsolate;
96 };
97
98 } // namespace blink
99
100
101 #endif // SKY_ENGINE_V8_INSPECTOR_PAGESCRIPTDEBUGSERVER_H_
OLDNEW
« no previous file with comments | « sky/engine/v8_inspector/PageDebuggerAgent.cpp ('k') | sky/engine/v8_inspector/PageScriptDebugServer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698