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

Side by Side Diff: Source/core/inspector/InspectorTraceEvents.cpp

Issue 997073004: Move inspector/InspectorNodeIds to dom/DOMNodeIds. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
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/animation/Animation.h" 11 #include "core/animation/Animation.h"
12 #include "core/animation/AnimationPlayer.h" 12 #include "core/animation/AnimationPlayer.h"
13 #include "core/css/invalidation/DescendantInvalidationSet.h" 13 #include "core/css/invalidation/DescendantInvalidationSet.h"
14 #include "core/dom/DOMNodeIds.h"
14 #include "core/dom/StyleChangeReason.h" 15 #include "core/dom/StyleChangeReason.h"
15 #include "core/events/Event.h" 16 #include "core/events/Event.h"
16 #include "core/fetch/CSSStyleSheetResource.h" 17 #include "core/fetch/CSSStyleSheetResource.h"
17 #include "core/frame/FrameView.h" 18 #include "core/frame/FrameView.h"
18 #include "core/frame/LocalFrame.h" 19 #include "core/frame/LocalFrame.h"
19 #include "core/inspector/IdentifiersFactory.h" 20 #include "core/inspector/IdentifiersFactory.h"
20 #include "core/inspector/InspectorNodeIds.h"
21 #include "core/inspector/ScriptCallStack.h" 21 #include "core/inspector/ScriptCallStack.h"
22 #include "core/layout/LayoutImage.h" 22 #include "core/layout/LayoutImage.h"
23 #include "core/layout/LayoutObject.h" 23 #include "core/layout/LayoutObject.h"
24 #include "core/page/Page.h" 24 #include "core/page/Page.h"
25 #include "core/paint/DeprecatedPaintLayer.h" 25 #include "core/paint/DeprecatedPaintLayer.h"
26 #include "core/workers/WorkerThread.h" 26 #include "core/workers/WorkerThread.h"
27 #include "core/xmlhttprequest/XMLHttpRequest.h" 27 #include "core/xmlhttprequest/XMLHttpRequest.h"
28 #include "platform/JSONValues.h" 28 #include "platform/JSONValues.h"
29 #include "platform/TracedValue.h" 29 #include "platform/TracedValue.h"
30 #include "platform/graphics/GraphicsLayer.h" 30 #include "platform/graphics/GraphicsLayer.h"
(...skipping 20 matching lines...) Expand all
51 TRACE_EVENT_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("devtools.timel ine.stack"), &stacksEnabled); 51 TRACE_EVENT_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("devtools.timel ine.stack"), &stacksEnabled);
52 if (!stacksEnabled) 52 if (!stacksEnabled)
53 return; 53 return;
54 RefPtrWillBeRawPtr<ScriptCallStack> scriptCallStack = createScriptCallStack( ScriptCallStack::maxCallStackSizeToCapture, true); 54 RefPtrWillBeRawPtr<ScriptCallStack> scriptCallStack = createScriptCallStack( ScriptCallStack::maxCallStackSizeToCapture, true);
55 if (scriptCallStack) 55 if (scriptCallStack)
56 scriptCallStack->toTracedValue(value, "stackTrace"); 56 scriptCallStack->toTracedValue(value, "stackTrace");
57 } 57 }
58 58
59 void setNodeInfo(TracedValue* value, Node* node, const char* idFieldName, const char* nameFieldName = nullptr) 59 void setNodeInfo(TracedValue* value, Node* node, const char* idFieldName, const char* nameFieldName = nullptr)
60 { 60 {
61 value->setInteger(idFieldName, InspectorNodeIds::idForNode(node)); 61 value->setInteger(idFieldName, DOMNodeIds::idForNode(node));
62 if (nameFieldName) 62 if (nameFieldName)
63 value->setString(nameFieldName, node->debugName()); 63 value->setString(nameFieldName, node->debugName());
64 } 64 }
65 65
66 const char* pseudoTypeToString(CSSSelector::PseudoType pseudoType) 66 const char* pseudoTypeToString(CSSSelector::PseudoType pseudoType)
67 { 67 {
68 switch (pseudoType) { 68 switch (pseudoType) {
69 #define DEFINE_STRING_MAPPING(pseudoType) case CSSSelector::pseudoType: return # pseudoType; 69 #define DEFINE_STRING_MAPPING(pseudoType) case CSSSelector::pseudoType: return # pseudoType;
70 DEFINE_STRING_MAPPING(PseudoNotParsed) 70 DEFINE_STRING_MAPPING(PseudoNotParsed)
71 DEFINE_STRING_MAPPING(PseudoUnknown) 71 DEFINE_STRING_MAPPING(PseudoUnknown)
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 } 712 }
713 713
714 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorAnimationStateEvent::d ata(const AnimationPlayer& player) 714 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorAnimationStateEvent::d ata(const AnimationPlayer& player)
715 { 715 {
716 RefPtr<TracedValue> value = TracedValue::create(); 716 RefPtr<TracedValue> value = TracedValue::create();
717 value->setString("state", player.playState()); 717 value->setString("state", player.playState());
718 return value.release(); 718 return value.release();
719 } 719 }
720 720
721 } 721 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698