OLD | NEW |
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 ~V8RuntimeAgentImpl() override; | 55 ~V8RuntimeAgentImpl() override; |
56 void restore(); | 56 void restore(); |
57 | 57 |
58 // Part of the protocol. | 58 // Part of the protocol. |
59 void enable(ErrorString*) override; | 59 void enable(ErrorString*) override; |
60 void disable(ErrorString*) override; | 60 void disable(ErrorString*) override; |
61 void evaluate( | 61 void evaluate( |
62 const String16& expression, | 62 const String16& expression, |
63 const Maybe<String16>& objectGroup, | 63 const Maybe<String16>& objectGroup, |
64 const Maybe<bool>& includeCommandLineAPI, | 64 const Maybe<bool>& includeCommandLineAPI, |
65 const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole, | 65 const Maybe<bool>& silent, |
66 const Maybe<int>& executionContextId, | 66 const Maybe<int>& executionContextId, |
67 const Maybe<bool>& returnByValue, | 67 const Maybe<bool>& returnByValue, |
68 const Maybe<bool>& generatePreview, | 68 const Maybe<bool>& generatePreview, |
69 const Maybe<bool>& userGesture, | 69 const Maybe<bool>& userGesture, |
70 const Maybe<bool>& awaitPromise, | 70 const Maybe<bool>& awaitPromise, |
71 std::unique_ptr<EvaluateCallback>) override; | 71 std::unique_ptr<EvaluateCallback>) override; |
72 void awaitPromise( | 72 void awaitPromise( |
73 const String16& promiseObjectId, | 73 const String16& promiseObjectId, |
74 const Maybe<bool>& returnByValue, | 74 const Maybe<bool>& returnByValue, |
75 const Maybe<bool>& generatePreview, | 75 const Maybe<bool>& generatePreview, |
76 std::unique_ptr<AwaitPromiseCallback>) override; | 76 std::unique_ptr<AwaitPromiseCallback>) override; |
77 void callFunctionOn( | 77 void callFunctionOn( |
78 const String16& objectId, | 78 const String16& objectId, |
79 const String16& expression, | 79 const String16& expression, |
80 const Maybe<protocol::Array<protocol::Runtime::CallArgument>>& optionalA
rguments, | 80 const Maybe<protocol::Array<protocol::Runtime::CallArgument>>& optionalA
rguments, |
81 const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole, | 81 const Maybe<bool>& silent, |
82 const Maybe<bool>& returnByValue, | 82 const Maybe<bool>& returnByValue, |
83 const Maybe<bool>& generatePreview, | 83 const Maybe<bool>& generatePreview, |
84 const Maybe<bool>& userGesture, | 84 const Maybe<bool>& userGesture, |
85 const Maybe<bool>& awaitPromise, | 85 const Maybe<bool>& awaitPromise, |
86 std::unique_ptr<CallFunctionOnCallback>) override; | 86 std::unique_ptr<CallFunctionOnCallback>) override; |
87 void releaseObject(ErrorString*, const String16& objectId) override; | 87 void releaseObject(ErrorString*, const String16& objectId) override; |
88 void getProperties(ErrorString*, | 88 void getProperties(ErrorString*, |
89 const String16& objectId, | 89 const String16& objectId, |
90 const Maybe<bool>& ownProperties, | 90 const Maybe<bool>& ownProperties, |
91 const Maybe<bool>& accessorPropertiesOnly, | 91 const Maybe<bool>& accessorPropertiesOnly, |
92 const Maybe<bool>& generatePreview, | 92 const Maybe<bool>& generatePreview, |
93 std::unique_ptr<protocol::Array<protocol::Runtime::PropertyDescriptor>>*
result, | 93 std::unique_ptr<protocol::Array<protocol::Runtime::PropertyDescriptor>>*
result, |
94 Maybe<protocol::Array<protocol::Runtime::InternalPropertyDescriptor>>* i
nternalProperties, | 94 Maybe<protocol::Array<protocol::Runtime::InternalPropertyDescriptor>>* i
nternalProperties, |
95 Maybe<protocol::Runtime::ExceptionDetails>*) override; | 95 Maybe<protocol::Runtime::ExceptionDetails>*) override; |
96 void releaseObjectGroup(ErrorString*, const String16& objectGroup) override; | 96 void releaseObjectGroup(ErrorString*, const String16& objectGroup) override; |
97 void run(ErrorString*) override; | 97 void runIfWaitingForDebugger(ErrorString*) override; |
98 void setCustomObjectFormatterEnabled(ErrorString*, bool) override; | 98 void setCustomObjectFormatterEnabled(ErrorString*, bool) override; |
99 void discardConsoleEntries(ErrorString*) override; | 99 void discardConsoleEntries(ErrorString*) override; |
100 void compileScript(ErrorString*, | 100 void compileScript(ErrorString*, |
101 const String16& expression, | 101 const String16& expression, |
102 const String16& sourceURL, | 102 const String16& sourceURL, |
103 bool persistScript, | 103 bool persistScript, |
104 const Maybe<int>& executionContextId, | 104 const Maybe<int>& executionContextId, |
105 Maybe<String16>*, | 105 Maybe<String16>*, |
106 Maybe<protocol::Runtime::ExceptionDetails>*) override; | 106 Maybe<protocol::Runtime::ExceptionDetails>*) override; |
107 void runScript( | 107 void runScript( |
108 const String16&, | 108 const String16&, |
109 const Maybe<int>& executionContextId, | 109 const Maybe<int>& executionContextId, |
110 const Maybe<String16>& objectGroup, | 110 const Maybe<String16>& objectGroup, |
111 const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole, | 111 const Maybe<bool>& silent, |
112 const Maybe<bool>& includeCommandLineAPI, | 112 const Maybe<bool>& includeCommandLineAPI, |
113 const Maybe<bool>& returnByValue, | 113 const Maybe<bool>& returnByValue, |
114 const Maybe<bool>& generatePreview, | 114 const Maybe<bool>& generatePreview, |
115 const Maybe<bool>& awaitPromise, | 115 const Maybe<bool>& awaitPromise, |
116 std::unique_ptr<RunScriptCallback>) override; | 116 std::unique_ptr<RunScriptCallback>) override; |
117 | 117 |
118 void reset(); | 118 void reset(); |
119 void reportExecutionContextCreated(InspectedContext*); | 119 void reportExecutionContextCreated(InspectedContext*); |
120 void reportExecutionContextDestroyed(InspectedContext*); | 120 void reportExecutionContextDestroyed(InspectedContext*); |
121 void inspect(std::unique_ptr<protocol::Runtime::RemoteObject> objectToInspec
t, std::unique_ptr<protocol::DictionaryValue> hints); | 121 void inspect(std::unique_ptr<protocol::Runtime::RemoteObject> objectToInspec
t, std::unique_ptr<protocol::DictionaryValue> hints); |
122 void messageAdded(V8ConsoleMessage*); | 122 void messageAdded(V8ConsoleMessage*); |
123 bool enabled() const { return m_enabled; } | 123 bool enabled() const { return m_enabled; } |
124 | 124 |
125 private: | 125 private: |
126 void reportMessage(V8ConsoleMessage*, bool generatePreview); | 126 void reportMessage(V8ConsoleMessage*, bool generatePreview); |
127 | 127 |
128 V8InspectorSessionImpl* m_session; | 128 V8InspectorSessionImpl* m_session; |
129 protocol::DictionaryValue* m_state; | 129 protocol::DictionaryValue* m_state; |
130 protocol::Runtime::Frontend m_frontend; | 130 protocol::Runtime::Frontend m_frontend; |
131 V8InspectorImpl* m_inspector; | 131 V8InspectorImpl* m_inspector; |
132 bool m_enabled; | 132 bool m_enabled; |
133 protocol::HashMap<String16, std::unique_ptr<v8::Global<v8::Script>>> m_compi
ledScripts; | 133 protocol::HashMap<String16, std::unique_ptr<v8::Global<v8::Script>>> m_compi
ledScripts; |
134 }; | 134 }; |
135 | 135 |
136 } // namespace v8_inspector | 136 } // namespace v8_inspector |
137 | 137 |
138 #endif // V8RuntimeAgentImpl_h | 138 #endif // V8RuntimeAgentImpl_h |
OLD | NEW |