| OLD | NEW |
| 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" |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorTimerRemoveEvent::data
(ExecutionContext* context, int timerId) | 419 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorTimerRemoveEvent::data
(ExecutionContext* context, int timerId) |
| 420 { | 420 { |
| 421 return genericTimerData(context, timerId); | 421 return genericTimerData(context, timerId); |
| 422 } | 422 } |
| 423 | 423 |
| 424 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorTimerFireEvent::data(E
xecutionContext* context, int timerId) | 424 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorTimerFireEvent::data(E
xecutionContext* context, int timerId) |
| 425 { | 425 { |
| 426 return genericTimerData(context, timerId); | 426 return genericTimerData(context, timerId); |
| 427 } | 427 } |
| 428 | 428 |
| 429 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorAnimationFrameEvent::d
ata(Document* document, int callbackId) | 429 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorAnimationFrameEvent::d
ata(ExecutionContext* context, int callbackId) |
| 430 { | 430 { |
| 431 RefPtr<TracedValue> value = TracedValue::create(); | 431 RefPtr<TracedValue> value = TracedValue::create(); |
| 432 value->setInteger("id", callbackId); | 432 value->setInteger("id", callbackId); |
| 433 value->setString("frame", toHexString(document->frame())); | 433 if (context->isDocument()) |
| 434 value->setString("frame", toHexString(toDocument(context)->frame())); |
| 435 else if (context->isWorkerGlobalScope()) |
| 436 value->setString("worker", toHexString(toWorkerGlobalScope(context))); |
| 434 setCallStack(value.get()); | 437 setCallStack(value.get()); |
| 435 return value.release(); | 438 return value.release(); |
| 436 } | 439 } |
| 437 | 440 |
| 438 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorWebSocketCreateEvent::
data(Document* document, unsigned long identifier, const KURL& url, const String
& protocol) | 441 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorWebSocketCreateEvent::
data(Document* document, unsigned long identifier, const KURL& url, const String
& protocol) |
| 439 { | 442 { |
| 440 RefPtr<TracedValue> value = TracedValue::create(); | 443 RefPtr<TracedValue> value = TracedValue::create(); |
| 441 value->setInteger("identifier", identifier); | 444 value->setInteger("identifier", identifier); |
| 442 value->setString("url", url.string()); | 445 value->setString("url", url.string()); |
| 443 value->setString("frame", toHexString(document->frame())); | 446 value->setString("frame", toHexString(document->frame())); |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 712 } | 715 } |
| 713 | 716 |
| 714 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorAnimationStateEvent::d
ata(const AnimationPlayer& player) | 717 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorAnimationStateEvent::d
ata(const AnimationPlayer& player) |
| 715 { | 718 { |
| 716 RefPtr<TracedValue> value = TracedValue::create(); | 719 RefPtr<TracedValue> value = TracedValue::create(); |
| 717 value->setString("state", player.playState()); | 720 value->setString("state", player.playState()); |
| 718 return value.release(); | 721 return value.release(); |
| 719 } | 722 } |
| 720 | 723 |
| 721 } | 724 } |
| OLD | NEW |