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

Side by Side Diff: sky/engine/core/inspector/InspectorTraceEvents.cpp

Issue 727593004: Wire up the Inspector V8 Debugger (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Actually works Created 6 years, 1 month 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/inspector/InspectorTraceEvents.h" 6 #include "core/inspector/InspectorTraceEvents.h"
7 7
8 #include "bindings/core/v8/ScriptCallStackFactory.h" 8 #include "bindings/core/v8/ScriptCallStackFactory.h"
9 #include "bindings/core/v8/ScriptGCEvent.h" 9 #include "bindings/core/v8/ScriptGCEvent.h"
10 #include "bindings/core/v8/ScriptSourceCode.h" 10 #include "bindings/core/v8/ScriptSourceCode.h"
11 #include "core/events/Event.h" 11 #include "core/events/Event.h"
12 #include "core/frame/FrameView.h" 12 #include "core/frame/FrameView.h"
13 #include "core/frame/LocalDOMWindow.h"
13 #include "core/frame/LocalFrame.h" 14 #include "core/frame/LocalFrame.h"
14 #include "core/inspector/IdentifiersFactory.h" 15 #include "core/inspector/IdentifiersFactory.h"
15 #include "core/inspector/InspectorNodeIds.h" 16 #include "core/inspector/InspectorNodeIds.h"
16 #include "core/inspector/ScriptCallStack.h" 17 #include "core/inspector/ScriptCallStack.h"
17 #include "core/page/Page.h" 18 #include "core/page/Page.h"
18 #include "core/rendering/RenderImage.h" 19 #include "core/rendering/RenderImage.h"
19 #include "core/rendering/RenderObject.h" 20 #include "core/rendering/RenderObject.h"
21 #include "platform/graphics/GraphicsLayer.h"
20 #include "platform/JSONValues.h" 22 #include "platform/JSONValues.h"
21 #include "platform/TracedValue.h"
22 #include "platform/graphics/GraphicsLayer.h"
23 #include "platform/network/ResourceRequest.h" 23 #include "platform/network/ResourceRequest.h"
24 #include "platform/network/ResourceResponse.h" 24 #include "platform/network/ResourceResponse.h"
25 #include "platform/TracedValue.h"
25 #include "platform/weborigin/KURL.h" 26 #include "platform/weborigin/KURL.h"
26 #include "wtf/Vector.h" 27 #include "wtf/Vector.h"
27 #include <inttypes.h> 28 #include <inttypes.h>
28 29
29 namespace blink { 30 namespace blink {
30 31
31 namespace { 32 namespace {
32 33
33 class JSCallStack : public TraceEvent::ConvertableToTraceFormat { 34 class JSCallStack : public TraceEvent::ConvertableToTraceFormat {
34 public: 35 public:
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 value->setBoolean("didFail", didFail); 152 value->setBoolean("didFail", didFail);
152 if (finishTime) 153 if (finishTime)
153 value->setDouble("networkTime", finishTime); 154 value->setDouble("networkTime", finishTime);
154 return value; 155 return value;
155 } 156 }
156 157
157 static LocalFrame* frameForExecutionContext(ExecutionContext* context) 158 static LocalFrame* frameForExecutionContext(ExecutionContext* context)
158 { 159 {
159 LocalFrame* frame = 0; 160 LocalFrame* frame = 0;
160 if (context->isDocument()) 161 if (context->isDocument())
161 frame = toDocument(context)->frame(); 162 frame = context->executingWindow()->frame();
162 return frame; 163 return frame;
163 } 164 }
164 165
165 static PassRefPtr<TracedValue> genericTimerData(ExecutionContext* context, int t imerId) 166 static PassRefPtr<TracedValue> genericTimerData(ExecutionContext* context, int t imerId)
166 { 167 {
167 RefPtr<TracedValue> value = TracedValue::create(); 168 RefPtr<TracedValue> value = TracedValue::create();
168 value->setInteger("timerId", timerId); 169 value->setInteger("timerId", timerId);
169 if (LocalFrame* frame = frameForExecutionContext(context)) 170 if (LocalFrame* frame = frameForExecutionContext(context))
170 value->setString("frame", toHexString(frame)); 171 value->setString("frame", toHexString(frame));
171 return value.release(); 172 return value.release();
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorTimeStampEvent::data(E xecutionContext* context, const String& message) 306 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorTimeStampEvent::data(E xecutionContext* context, const String& message)
306 { 307 {
307 RefPtr<TracedValue> value = TracedValue::create(); 308 RefPtr<TracedValue> value = TracedValue::create();
308 value->setString("message", message); 309 value->setString("message", message);
309 if (LocalFrame* frame = frameForExecutionContext(context)) 310 if (LocalFrame* frame = frameForExecutionContext(context))
310 value->setString("frame", toHexString(frame)); 311 value->setString("frame", toHexString(frame));
311 return value; 312 return value;
312 } 313 }
313 314
314 } 315 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698