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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.h

Issue 1967933002: [DevTools] Dispatch messages to V8InspectorSession directly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@1936593002
Patch Set: rebased Created 4 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
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 14 matching lines...) Expand all
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 V8RuntimeAgentImpl_h 31 #ifndef V8RuntimeAgentImpl_h
32 #define V8RuntimeAgentImpl_h 32 #define V8RuntimeAgentImpl_h
33 33
34 #include "platform/inspector_protocol/Allocator.h" 34 #include "platform/inspector_protocol/Allocator.h"
35 #include "platform/inspector_protocol/Backend.h"
35 #include "platform/inspector_protocol/Frontend.h" 36 #include "platform/inspector_protocol/Frontend.h"
36 #include "platform/v8_inspector/public/V8RuntimeAgent.h" 37 #include "platform/inspector_protocol/String16.h"
38
39 #include <v8.h>
37 40
38 namespace blink { 41 namespace blink {
39 42
40 class InjectedScript; 43 class InjectedScript;
41 class InspectedContext; 44 class InspectedContext;
42 class RemoteObjectIdBase; 45 class RemoteObjectIdBase;
43 class V8DebuggerImpl; 46 class V8DebuggerImpl;
44 class V8InspectorSessionImpl; 47 class V8InspectorSessionImpl;
45 48
46 namespace protocol { 49 namespace protocol {
47 class DictionaryValue; 50 class DictionaryValue;
48 } 51 }
49 52
50 using protocol::Maybe; 53 using protocol::Maybe;
51 54
52 class V8RuntimeAgentImpl : public V8RuntimeAgent { 55 class V8RuntimeAgentImpl : public protocol::Backend::Runtime {
53 PROTOCOL_DISALLOW_COPY(V8RuntimeAgentImpl); 56 PROTOCOL_DISALLOW_COPY(V8RuntimeAgentImpl);
54 public: 57 public:
55 explicit V8RuntimeAgentImpl(V8InspectorSessionImpl*); 58 V8RuntimeAgentImpl(V8InspectorSessionImpl*, protocol::Frontend::Runtime*, pr otocol::DictionaryValue* state);
56 ~V8RuntimeAgentImpl() override; 59 ~V8RuntimeAgentImpl() override;
57 60 void restore();
58 // State management methods.
59 void setInspectorState(protocol::DictionaryValue*) override;
60 void setFrontend(protocol::Frontend::Runtime*) override;
61 void clearFrontend() override;
62 void restore() override;
63 61
64 // Part of the protocol. 62 // Part of the protocol.
65 void enable(ErrorString*) override; 63 void enable(ErrorString*) override;
66 void disable(ErrorString*) override; 64 void disable(ErrorString*) override;
67 void evaluate(ErrorString*, 65 void evaluate(ErrorString*,
68 const String16& expression, 66 const String16& expression,
69 const Maybe<String16>& objectGroup, 67 const Maybe<String16>& objectGroup,
70 const Maybe<bool>& includeCommandLineAPI, 68 const Maybe<bool>& includeCommandLineAPI,
71 const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole, 69 const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole,
72 const Maybe<int>& executionContextId, 70 const Maybe<int>& executionContextId,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 protocol::DictionaryValue* m_state; 122 protocol::DictionaryValue* m_state;
125 protocol::Frontend::Runtime* m_frontend; 123 protocol::Frontend::Runtime* m_frontend;
126 V8DebuggerImpl* m_debugger; 124 V8DebuggerImpl* m_debugger;
127 bool m_enabled; 125 bool m_enabled;
128 protocol::HashMap<String16, OwnPtr<v8::Global<v8::Script>>> m_compiledScript s; 126 protocol::HashMap<String16, OwnPtr<v8::Global<v8::Script>>> m_compiledScript s;
129 }; 127 };
130 128
131 } // namespace blink 129 } // namespace blink
132 130
133 #endif // V8RuntimeAgentImpl_h 131 #endif // V8RuntimeAgentImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698