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

Side by Side Diff: third_party/WebKit/Source/core/inspector/InspectorRuntimeAgent.cpp

Issue 1738073002: DevTools: introduce protocol::Value, baseline for hierarchical data in remote debugging protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 15 matching lines...) Expand all
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 #include "core/inspector/InspectorRuntimeAgent.h" 31 #include "core/inspector/InspectorRuntimeAgent.h"
32 32
33 #include "bindings/core/v8/ScriptState.h" 33 #include "bindings/core/v8/ScriptState.h"
34 #include "core/inspector/InspectorTraceEvents.h" 34 #include "core/inspector/InspectorTraceEvents.h"
35 #include "core/inspector/MuteConsoleScope.h" 35 #include "core/inspector/MuteConsoleScope.h"
36 #include "platform/JSONValues.h" 36 #include "platform/inspector_protocol/Values.h"
37 #include "platform/v8_inspector/public/V8Debugger.h" 37 #include "platform/v8_inspector/public/V8Debugger.h"
38 #include "platform/v8_inspector/public/V8RuntimeAgent.h" 38 #include "platform/v8_inspector/public/V8RuntimeAgent.h"
39 39
40 namespace blink { 40 namespace blink {
41 41
42 namespace InspectorRuntimeAgentState { 42 namespace InspectorRuntimeAgentState {
43 static const char runtimeEnabled[] = "runtimeEnabled"; 43 static const char runtimeEnabled[] = "runtimeEnabled";
44 }; 44 };
45 45
46 InspectorRuntimeAgent::InspectorRuntimeAgent(V8Debugger* debugger, Client* clien t) 46 InspectorRuntimeAgent::InspectorRuntimeAgent(V8Debugger* debugger, Client* clien t)
47 : InspectorBaseAgent<InspectorRuntimeAgent, protocol::Frontend::Runtime>("Ru ntime") 47 : InspectorBaseAgent<InspectorRuntimeAgent, protocol::Frontend::Runtime>("Ru ntime")
48 , m_enabled(false) 48 , m_enabled(false)
49 , m_v8RuntimeAgent(V8RuntimeAgent::create(debugger)) 49 , m_v8RuntimeAgent(V8RuntimeAgent::create(debugger))
50 , m_client(client) 50 , m_client(client)
51 { 51 {
52 } 52 }
53 53
54 InspectorRuntimeAgent::~InspectorRuntimeAgent() 54 InspectorRuntimeAgent::~InspectorRuntimeAgent()
55 { 55 {
56 } 56 }
57 57
58 // InspectorBaseAgent overrides. 58 // InspectorBaseAgent overrides.
59 void InspectorRuntimeAgent::setState(PassRefPtr<JSONObject> state) 59 void InspectorRuntimeAgent::setState(PassRefPtr<protocol::DictionaryValue> state )
60 { 60 {
61 InspectorBaseAgent::setState(state); 61 InspectorBaseAgent::setState(state);
62 m_v8RuntimeAgent->setInspectorState(m_state); 62 m_v8RuntimeAgent->setInspectorState(m_state);
63 } 63 }
64 64
65 void InspectorRuntimeAgent::setFrontend(protocol::Frontend* frontend) 65 void InspectorRuntimeAgent::setFrontend(protocol::Frontend* frontend)
66 { 66 {
67 InspectorBaseAgent::setFrontend(frontend); 67 InspectorBaseAgent::setFrontend(frontend);
68 m_v8RuntimeAgent->setFrontend(protocol::Frontend::Runtime::from(frontend)); 68 m_v8RuntimeAgent->setFrontend(protocol::Frontend::Runtime::from(frontend));
69 } 69 }
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 m_v8RuntimeAgent->reportExecutionContextCreated(scriptState->context(), type , origin, humanReadableName, frameId); 216 m_v8RuntimeAgent->reportExecutionContextCreated(scriptState->context(), type , origin, humanReadableName, frameId);
217 } 217 }
218 218
219 void InspectorRuntimeAgent::reportExecutionContextDestroyed(ScriptState* scriptS tate) 219 void InspectorRuntimeAgent::reportExecutionContextDestroyed(ScriptState* scriptS tate)
220 { 220 {
221 v8::HandleScope handles(scriptState->isolate()); 221 v8::HandleScope handles(scriptState->isolate());
222 m_v8RuntimeAgent->reportExecutionContextDestroyed(scriptState->context()); 222 m_v8RuntimeAgent->reportExecutionContextDestroyed(scriptState->context());
223 } 223 }
224 224
225 } // namespace blink 225 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698