| Differences between
and this patch
- a/Source/WebCore/ChangeLog +59 lines
Lines 1-5 a/Source/WebCore/ChangeLog_sec1
1
2013-02-26  Andrey Kosyakov  <caseq@chromium.org>
1
2013-02-26  Andrey Kosyakov  <caseq@chromium.org>
2
2
3
        Web Inspector: plumb trace events to Timeline agent
4
        https://bugs.webkit.org/show_bug.cgi?id=105796
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        - plumb trace events to Timeline;
9
        - add TimelineTraceEventProcessor to process selected trace events;
10
        - emit timeline events from TimelineTraceEventProcessor.
11
12
        Note that actual event processing logic is a separate change.
13
14
        * CMakeLists.txt: Added TimelineTraceEventProcessor.{h,cpp}.
15
        * GNUmakefile.list.am:  Ditto.
16
        * Target.pri: Ditto.
17
        * WebCore.gypi: Ditto.
18
        * WebCore.vcproj/WebCore.vcproj: Ditto.
19
        * WebCore.xcodeproj/project.pbxproj: Ditto.
20
        * inspector/InspectorAllInOne.cpp: Ditto.
21
        * inspector/InspectorClient.h:
22
        (InspectorClient):
23
        (WebCore::InspectorClient::setTraceEventCallback):
24
        * inspector/InspectorTimelineAgent.cpp: create/destroy trace event processor on start/stop.
25
        (WebCore::InspectorTimelineAgent::start): 
26
        (WebCore::InspectorTimelineAgent::stop):
27
        (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
28
        (WebCore::InspectorTimelineAgent::page):
29
        (WebCore):
30
        * inspector/InspectorTimelineAgent.h:
31
        (WebCore):
32
        (InspectorTimelineAgent):
33
        * inspector/TimelineTraceEventProcessor.cpp: Added.
34
        (WebCore::TimelineTraceEventProcessor::TimelineTraceEventProcessor):
35
        (WebCore):
36
        (WebCore::TimelineTraceEventProcessor::~TimelineTraceEventProcessor):
37
        (WebCore::TimelineTraceEventProcessor::TraceEvent::parameter):
38
        (WebCore::TimelineTraceEventProcessor::processEventOnAnyThread):
39
        (WebCore::TimelineTraceEventProcessor::processEvent):
40
        (WebCore::TimelineTraceEventProcessor::sendTimelineRecord):
41
        (WebCore::TimelineTraceEventProcessor::processBackgroundEvents):
42
        * inspector/TimelineTraceEventProcessor.h: Added.
43
        (WebCore):
44
        (TimelineTraceEventProcessor):
45
        (TraceEvent):
46
        (WebCore::TimelineTraceEventProcessor::TraceEvent::TraceEvent):
47
        (WebCore::TimelineTraceEventProcessor::TraceEvent::timestamp):
48
        (WebCore::TimelineTraceEventProcessor::TraceEvent::phase):
49
        (WebCore::TimelineTraceEventProcessor::TraceEvent::name):
50
        (WebCore::TimelineTraceEventProcessor::TraceEvent::threadIdentifier):
51
        (WebCore::TimelineTraceEventProcessor::TraceEvent::argumentCount):
52
        (WebCore::TimelineTraceEventProcessor::TraceEvent::asBool):
53
        (WebCore::TimelineTraceEventProcessor::TraceEvent::asInt):
54
        (WebCore::TimelineTraceEventProcessor::TraceEvent::asUInt):
55
        (WebCore::TimelineTraceEventProcessor::TraceEvent::asDouble):
56
        (WebCore::TimelineTraceEventProcessor::TraceEvent::asString):
57
        (WebCore::TimelineTraceEventProcessor::EventTypeEntry::EventTypeEntry):
58
        (EventTypeEntry):
59
60
2013-02-26  Andrey Kosyakov  <caseq@chromium.org>
61
3
        Unreviewed, rolling out r144041, r144044, and r144048.
62
        Unreviewed, rolling out r144041, r144044, and r144048.
4
        http://trac.webkit.org/changeset/144041
63
        http://trac.webkit.org/changeset/144041
5
        http://trac.webkit.org/changeset/144044
64
        http://trac.webkit.org/changeset/144044
- a/Source/WebKit/chromium/ChangeLog +46 lines
Lines 1-5 a/Source/WebKit/chromium/ChangeLog_sec1
1
2013-02-26  Andrey Kosyakov  <caseq@chromium.org>
1
2013-02-26  Andrey Kosyakov  <caseq@chromium.org>
2
2
3
        Plumbing trace events to Timeline
4
5
        Web Inspector: plumb trace events to Timeline agent
6
        https://bugs.webkit.org/show_bug.cgi?id=105796
7
8
        Reviewed by NOBODY (OOPS!).
9
10
        * public/WebDevToolsAgentClient.h:
11
        (WebDevToolsAgentClient):
12
        (WebKit::WebDevToolsAgentClient::setTraceEventCallback):
13
        * src/InspectorClientImpl.cpp:
14
        (WebKit::InspectorClientImpl::setTraceEventCallback):
15
        (WebKit):
16
        * src/InspectorClientImpl.h:
17
        (InspectorClientImpl):
18
        * src/WebDevToolsAgentImpl.cpp:
19
        (WebKit::WebDevToolsAgentImpl::setTraceEventCallback):
20
        (WebKit):
21
        * src/WebDevToolsAgentImpl.h:
22
        (WebDevToolsAgentImpl):
23
24
2013-02-01  Andrey Kosyakov  <caseq@chromium.org>
25
26
        Web Inspector: plumb trace events to Timeline agent
27
        https://bugs.webkit.org/show_bug.cgi?id=105796
28
29
        Reviewed by NOBODY (OOPS!).
30
31
        Plumb trace events to Inspector.
32
33
        * public/WebDevToolsAgentClient.h:
34
        (WebDevToolsAgentClient):
35
        (WebKit::WebDevToolsAgentClient::setTraceEventCallback):
36
        * src/InspectorClientImpl.cpp:
37
        (WebKit::InspectorClientImpl::setTraceEventCallback):
38
        (WebKit):
39
        * src/InspectorClientImpl.h:
40
        (InspectorClientImpl):
41
        * src/WebDevToolsAgentImpl.cpp:
42
        (WebKit::WebDevToolsAgentImpl::setTraceEventCallback):
43
        (WebKit):
44
        * src/WebDevToolsAgentImpl.h:
45
        (WebDevToolsAgentImpl):
46
47
2013-02-26  Andrey Kosyakov  <caseq@chromium.org>
48
3
        Unreviewed, rolling out r144041, r144044, and r144048.
49
        Unreviewed, rolling out r144041, r144044, and r144048.
4
        http://trac.webkit.org/changeset/144041
50
        http://trac.webkit.org/changeset/144041
5
        http://trac.webkit.org/changeset/144044
51
        http://trac.webkit.org/changeset/144044
- a/Source/WebCore/CMakeLists.txt +1 lines
Lines 1655-1660 set(WebCore_SOURCES a/Source/WebCore/CMakeLists.txt_sec1
1655
    inspector/ScriptCallFrame.cpp
1655
    inspector/ScriptCallFrame.cpp
1656
    inspector/ScriptCallStack.cpp
1656
    inspector/ScriptCallStack.cpp
1657
    inspector/TimelineRecordFactory.cpp
1657
    inspector/TimelineRecordFactory.cpp
1658
    inspector/TimelineTraceEventProcessor.cpp
1658
    inspector/WorkerConsoleAgent.cpp
1659
    inspector/WorkerConsoleAgent.cpp
1659
    inspector/WorkerDebuggerAgent.cpp
1660
    inspector/WorkerDebuggerAgent.cpp
1660
    inspector/WorkerInspectorController.cpp
1661
    inspector/WorkerInspectorController.cpp
- a/Source/WebCore/GNUmakefile.list.am +2 lines
Lines 3907-3912 webcore_sources += \ a/Source/WebCore/GNUmakefile.list.am_sec1
3907
	Source/WebCore/inspector/ScriptGCEventListener.h \
3907
	Source/WebCore/inspector/ScriptGCEventListener.h \
3908
	Source/WebCore/inspector/TimelineRecordFactory.cpp \
3908
	Source/WebCore/inspector/TimelineRecordFactory.cpp \
3909
	Source/WebCore/inspector/TimelineRecordFactory.h \
3909
	Source/WebCore/inspector/TimelineRecordFactory.h \
3910
	Source/WebCore/inspector/TimelineTraceEventProcessor.cpp \
3911
	Source/WebCore/inspector/TimelineTraceEventProcessor.h \
3910
	Source/WebCore/inspector/WorkerConsoleAgent.cpp \
3912
	Source/WebCore/inspector/WorkerConsoleAgent.cpp \
3911
	Source/WebCore/inspector/WorkerConsoleAgent.h \
3913
	Source/WebCore/inspector/WorkerConsoleAgent.h \
3912
	Source/WebCore/inspector/WorkerDebuggerAgent.cpp \
3914
	Source/WebCore/inspector/WorkerDebuggerAgent.cpp \
- a/Source/WebCore/Target.pri +1 lines
Lines 828-833 SOURCES += \ a/Source/WebCore/Target.pri_sec1
828
    inspector/ScriptCallFrame.cpp \
828
    inspector/ScriptCallFrame.cpp \
829
    inspector/ScriptCallStack.cpp \
829
    inspector/ScriptCallStack.cpp \
830
    inspector/TimelineRecordFactory.cpp \
830
    inspector/TimelineRecordFactory.cpp \
831
    inspector/TimelineTraceEventProcessor.cpp \
831
    inspector/WorkerConsoleAgent.cpp \
832
    inspector/WorkerConsoleAgent.cpp \
832
    inspector/WorkerDebuggerAgent.cpp \
833
    inspector/WorkerDebuggerAgent.cpp \
833
    inspector/WorkerInspectorController.cpp \
834
    inspector/WorkerInspectorController.cpp \
- a/Source/WebCore/WebCore.gypi +2 lines
Lines 1936-1941 a/Source/WebCore/WebCore.gypi_sec1
1936
            'inspector/ScriptGCEventListener.h',
1936
            'inspector/ScriptGCEventListener.h',
1937
            'inspector/TimelineRecordFactory.cpp',
1937
            'inspector/TimelineRecordFactory.cpp',
1938
            'inspector/TimelineRecordFactory.h',
1938
            'inspector/TimelineRecordFactory.h',
1939
            'inspector/TimelineTraceEventProcessor.cpp',
1940
            'inspector/TimelineTraceEventProcessor.h',
1939
            'inspector/WorkerConsoleAgent.cpp',
1941
            'inspector/WorkerConsoleAgent.cpp',
1940
            'inspector/WorkerConsoleAgent.h',
1942
            'inspector/WorkerConsoleAgent.h',
1941
            'inspector/WorkerDebuggerAgent.cpp',
1943
            'inspector/WorkerDebuggerAgent.cpp',
- a/Source/WebCore/WebCore.vcproj/WebCore.vcproj +24 lines
Lines 76854-76859 a/Source/WebCore/WebCore.vcproj/WebCore.vcproj_sec1
76854
				RelativePath="..\inspector\TimelineRecordFactory.h"
76854
				RelativePath="..\inspector\TimelineRecordFactory.h"
76855
				>
76855
				>
76856
			</File>
76856
			</File>
76857
                        <File
76858
                                RelativePath="..\inspector\TimelineTraceEventProcessor.cpp"
76859
                                >
76860
                                <FileConfiguration
76861
                                        Name="Release|Win32"
76862
                                        ExcludedFromBuild="true"
76863
                                        >
76864
                                        <Tool
76865
                                                Name="VCCLCompilerTool"
76866
                                        />
76867
                                </FileConfiguration>
76868
                                <FileConfiguration
76869
                                        Name="Production|Win32"
76870
                                        ExcludedFromBuild="true"
76871
                                        >
76872
                                        <Tool
76873
                                                Name="VCCLCompilerTool"
76874
                                        />
76875
                                </FileConfiguration>
76876
                        </File>
76877
                        <File
76878
                                RelativePath="..\inspector\TimelineTraceEventProcessor.h"
76879
                                >
76880
                        </File>
76857
			<File
76881
			<File
76858
				RelativePath="..\inspector\WorkerConsoleAgent.cpp"
76882
				RelativePath="..\inspector\WorkerConsoleAgent.cpp"
76859
				>
76883
				>
- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj +8 lines
Lines 1283-1288 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec1
1283
		46F9D5DF0B0D60170028EE36 /* progressCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46F9D5DC0B0D60170028EE36 /* progressCursor.png */; };
1283
		46F9D5DF0B0D60170028EE36 /* progressCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46F9D5DC0B0D60170028EE36 /* progressCursor.png */; };
1284
		490707E61219C04300D90E51 /* ANGLEWebKitBridge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 490707E41219C04300D90E51 /* ANGLEWebKitBridge.cpp */; };
1284
		490707E61219C04300D90E51 /* ANGLEWebKitBridge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 490707E41219C04300D90E51 /* ANGLEWebKitBridge.cpp */; };
1285
		490707E71219C04300D90E51 /* ANGLEWebKitBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 490707E51219C04300D90E51 /* ANGLEWebKitBridge.h */; };
1285
		490707E71219C04300D90E51 /* ANGLEWebKitBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 490707E51219C04300D90E51 /* ANGLEWebKitBridge.h */; };
1286
		49140256168E02E8002D6C6A /* TimelineTraceEventProcessor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49140254168E02B4002D6C6A /* TimelineTraceEventProcessor.cpp */; };
1287
		49140257168E02EC002D6C6A /* TimelineTraceEventProcessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 49140255168E02B4002D6C6A /* TimelineTraceEventProcessor.h */; };
1286
		49182B5215DCE6F000548418 /* PlatformInstrumentation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49182B5015DCE6F000548418 /* PlatformInstrumentation.cpp */; };
1288
		49182B5215DCE6F000548418 /* PlatformInstrumentation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49182B5015DCE6F000548418 /* PlatformInstrumentation.cpp */; };
1287
		49182B5315DCE6F000548418 /* PlatformInstrumentation.h in Headers */ = {isa = PBXBuildFile; fileRef = 49182B5115DCE6F000548418 /* PlatformInstrumentation.h */; };
1289
		49182B5315DCE6F000548418 /* PlatformInstrumentation.h in Headers */ = {isa = PBXBuildFile; fileRef = 49182B5115DCE6F000548418 /* PlatformInstrumentation.h */; };
1288
		492863991253B8FC00F792D6 /* ResourceLoadInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 492863981253B8FC00F792D6 /* ResourceLoadInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
1290
		492863991253B8FC00F792D6 /* ResourceLoadInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 492863981253B8FC00F792D6 /* ResourceLoadInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
Lines 8695-8700 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec2
8695
		46F9D5DC0B0D60170028EE36 /* progressCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = progressCursor.png; sourceTree = "<group>"; };
8697
		46F9D5DC0B0D60170028EE36 /* progressCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = progressCursor.png; sourceTree = "<group>"; };
8696
		490707E41219C04300D90E51 /* ANGLEWebKitBridge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ANGLEWebKitBridge.cpp; sourceTree = "<group>"; };
8698
		490707E41219C04300D90E51 /* ANGLEWebKitBridge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ANGLEWebKitBridge.cpp; sourceTree = "<group>"; };
8697
		490707E51219C04300D90E51 /* ANGLEWebKitBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANGLEWebKitBridge.h; sourceTree = "<group>"; };
8699
		490707E51219C04300D90E51 /* ANGLEWebKitBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANGLEWebKitBridge.h; sourceTree = "<group>"; };
8700
		49140254168E02B4002D6C6A /* TimelineTraceEventProcessor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TimelineTraceEventProcessor.cpp; sourceTree = "<group>"; };
8701
		49140255168E02B4002D6C6A /* TimelineTraceEventProcessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TimelineTraceEventProcessor.h; sourceTree = "<group>"; };
8698
		49182B5015DCE6F000548418 /* PlatformInstrumentation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformInstrumentation.cpp; sourceTree = "<group>"; };
8702
		49182B5015DCE6F000548418 /* PlatformInstrumentation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformInstrumentation.cpp; sourceTree = "<group>"; };
8699
		49182B5115DCE6F000548418 /* PlatformInstrumentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformInstrumentation.h; sourceTree = "<group>"; };
8703
		49182B5115DCE6F000548418 /* PlatformInstrumentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformInstrumentation.h; sourceTree = "<group>"; };
8700
		492863981253B8FC00F792D6 /* ResourceLoadInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceLoadInfo.h; sourceTree = "<group>"; };
8704
		492863981253B8FC00F792D6 /* ResourceLoadInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceLoadInfo.h; sourceTree = "<group>"; };
Lines 15342-15347 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec3
15342
				9FA37EF01172FD4100C4CD55 /* ScriptProfileNode.idl */,
15346
				9FA37EF01172FD4100C4CD55 /* ScriptProfileNode.idl */,
15343
				7553CFE7108F473F00EA281E /* TimelineRecordFactory.cpp */,
15347
				7553CFE7108F473F00EA281E /* TimelineRecordFactory.cpp */,
15344
				7553CFE6108F473F00EA281E /* TimelineRecordFactory.h */,
15348
				7553CFE6108F473F00EA281E /* TimelineRecordFactory.h */,
15349
				49140254168E02B4002D6C6A /* TimelineTraceEventProcessor.cpp */,
15350
				49140255168E02B4002D6C6A /* TimelineTraceEventProcessor.h */,
15345
				F382088E147D35F90010BC06 /* WorkerConsoleAgent.cpp */,
15351
				F382088E147D35F90010BC06 /* WorkerConsoleAgent.cpp */,
15346
				F382088F147D35F90010BC06 /* WorkerConsoleAgent.h */,
15352
				F382088F147D35F90010BC06 /* WorkerConsoleAgent.h */,
15347
				F34742DE1343631F00531BC2 /* WorkerDebuggerAgent.cpp */,
15353
				F34742DE1343631F00531BC2 /* WorkerDebuggerAgent.cpp */,
Lines 26615-26620 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec4
26615
				977E2E0F12F0FC9C00C13380 /* XSSAuditorDelegate.h in Headers */,
26621
				977E2E0F12F0FC9C00C13380 /* XSSAuditorDelegate.h in Headers */,
26616
				FD537353137B651800008DCE /* ZeroPole.h in Headers */,
26622
				FD537353137B651800008DCE /* ZeroPole.h in Headers */,
26617
				41B8CD4616D04591000E8CC0 /* SelectorCheckerFastPath.h in Headers */,
26623
				41B8CD4616D04591000E8CC0 /* SelectorCheckerFastPath.h in Headers */,
26624
				49140257168E02EC002D6C6A /* TimelineTraceEventProcessor.h in Headers */,
26618
			);
26625
			);
26619
			runOnlyForDeploymentPostprocessing = 0;
26626
			runOnlyForDeploymentPostprocessing = 0;
26620
		};
26627
		};
Lines 29809-29814 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec5
29809
				977E2E0E12F0FC9C00C13380 /* XSSAuditorDelegate.cpp in Sources */,
29816
				977E2E0E12F0FC9C00C13380 /* XSSAuditorDelegate.cpp in Sources */,
29810
				FD537352137B651800008DCE /* ZeroPole.cpp in Sources */,
29817
				FD537352137B651800008DCE /* ZeroPole.cpp in Sources */,
29811
				41B8CD4516D04591000E8CC0 /* SelectorCheckerFastPath.cpp in Sources */,
29818
				41B8CD4516D04591000E8CC0 /* SelectorCheckerFastPath.cpp in Sources */,
29819
				49140256168E02E8002D6C6A /* TimelineTraceEventProcessor.cpp in Sources */,
29812
			);
29820
			);
29813
			runOnlyForDeploymentPostprocessing = 0;
29821
			runOnlyForDeploymentPostprocessing = 0;
29814
		};
29822
		};
- a/Source/WebCore/inspector/InspectorAllInOne.cpp +1 lines
Lines 83-88 a/Source/WebCore/inspector/InspectorAllInOne.cpp_sec1
83
#include "ScriptCallFrame.cpp"
83
#include "ScriptCallFrame.cpp"
84
#include "ScriptCallStack.cpp"
84
#include "ScriptCallStack.cpp"
85
#include "TimelineRecordFactory.cpp"
85
#include "TimelineRecordFactory.cpp"
86
#include "TimelineTraceEventProcessor.cpp"
86
#include "WorkerConsoleAgent.cpp"
87
#include "WorkerConsoleAgent.cpp"
87
#include "WorkerDebuggerAgent.cpp"
88
#include "WorkerDebuggerAgent.cpp"
88
#include "WorkerInspectorController.cpp"
89
#include "WorkerInspectorController.cpp"
- a/Source/WebCore/inspector/InspectorClient.h +5 lines
Lines 59-64 public: a/Source/WebCore/inspector/InspectorClient.h_sec1
59
    virtual void clearBrowserCookies() { }
59
    virtual void clearBrowserCookies() { }
60
    virtual bool canMonitorMainThread() { return false; }
60
    virtual bool canMonitorMainThread() { return false; }
61
61
62
    typedef void (*TraceEventCallback)(char phase, const unsigned char*, const char* name, unsigned long long id,
63
        int numArgs, const char* const* argNames, const unsigned char* argTypes, const unsigned long long* argValues,
64
        unsigned char flags);
65
    virtual void setTraceEventCallback(TraceEventCallback) { }
66
62
    virtual bool canOverrideDeviceMetrics() { return false; }
67
    virtual bool canOverrideDeviceMetrics() { return false; }
63
68
64
    virtual void overrideDeviceMetrics(int /*width*/, int /*height*/, float /*fontScaleFactor*/, bool /*fitWindow*/)
69
    virtual void overrideDeviceMetrics(int /*width*/, int /*height*/, float /*fontScaleFactor*/, bool /*fitWindow*/)
- a/Source/WebCore/inspector/InspectorTimelineAgent.cpp -1 / +12 lines
Lines 1-5 a/Source/WebCore/inspector/InspectorTimelineAgent.cpp_sec1
1
/*
1
/*
2
* Copyright (C) 2009 Google Inc. All rights reserved.
2
* Copyright (C) 2013 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
Lines 53-58 a/Source/WebCore/inspector/InspectorTimelineAgent.cpp_sec2
53
#include "ResourceRequest.h"
53
#include "ResourceRequest.h"
54
#include "ResourceResponse.h"
54
#include "ResourceResponse.h"
55
#include "TimelineRecordFactory.h"
55
#include "TimelineRecordFactory.h"
56
#include "TimelineTraceEventProcessor.h"
56
57
57
#include <wtf/CurrentTime.h>
58
#include <wtf/CurrentTime.h>
58
59
Lines 179-184 void InspectorTimelineAgent::start(ErrorString*, const int* maxCallStackDepth) a/Source/WebCore/inspector/InspectorTimelineAgent.cpp_sec3
179
    m_instrumentingAgents->setInspectorTimelineAgent(this);
180
    m_instrumentingAgents->setInspectorTimelineAgent(this);
180
    ScriptGCEvent::addEventListener(this);
181
    ScriptGCEvent::addEventListener(this);
181
    m_state->setBoolean(TimelineAgentState::timelineAgentEnabled, true);
182
    m_state->setBoolean(TimelineAgentState::timelineAgentEnabled, true);
183
    if (m_client && m_pageAgent)
184
        m_traceEventProcessor = adoptRef(new TimelineTraceEventProcessor(m_weakFactory.createWeakPtr(), m_client));
182
}
185
}
183
186
184
void InspectorTimelineAgent::stop(ErrorString*)
187
void InspectorTimelineAgent::stop(ErrorString*)
Lines 186-191 void InspectorTimelineAgent::stop(ErrorString*) a/Source/WebCore/inspector/InspectorTimelineAgent.cpp_sec4
186
    if (!m_state->getBoolean(TimelineAgentState::timelineAgentEnabled))
189
    if (!m_state->getBoolean(TimelineAgentState::timelineAgentEnabled))
187
        return;
190
        return;
188
191
192
    m_traceEventProcessor.clear();
193
    m_weakFactory.revokeAll();
189
    m_instrumentingAgents->setInspectorTimelineAgent(0);
194
    m_instrumentingAgents->setInspectorTimelineAgent(0);
190
    ScriptGCEvent::removeEventListener(this);
195
    ScriptGCEvent::removeEventListener(this);
191
196
Lines 635-640 InspectorTimelineAgent::InspectorTimelineAgent(InstrumentingAgents* instrumentin a/Source/WebCore/inspector/InspectorTimelineAgent.cpp_sec5
635
    , m_platformInstrumentationClientInstalledAtStackDepth(0)
640
    , m_platformInstrumentationClientInstalledAtStackDepth(0)
636
    , m_inspectorType(type)
641
    , m_inspectorType(type)
637
    , m_client(client)
642
    , m_client(client)
643
    , m_weakFactory(this)
638
{
644
{
639
}
645
}
640
646
Lines 706-711 double InspectorTimelineAgent::timestampFromMicroseconds(double microseconds) a/Source/WebCore/inspector/InspectorTimelineAgent.cpp_sec6
706
    return (microseconds + m_timestampOffset) * 1000.0;
712
    return (microseconds + m_timestampOffset) * 1000.0;
707
}
713
}
708
714
715
Page* InspectorTimelineAgent::page()
716
{
717
    return m_pageAgent ? m_pageAgent->page() : 0;
718
}
719
709
} // namespace WebCore
720
} // namespace WebCore
710
721
711
#endif // ENABLE(INSPECTOR)
722
#endif // ENABLE(INSPECTOR)
- a/Source/WebCore/inspector/InspectorTimelineAgent.h +8 lines
Lines 42-47 a/Source/WebCore/inspector/InspectorTimelineAgent.h_sec1
42
#include "ScriptGCEventListener.h"
42
#include "ScriptGCEventListener.h"
43
#include <wtf/PassOwnPtr.h>
43
#include <wtf/PassOwnPtr.h>
44
#include <wtf/Vector.h>
44
#include <wtf/Vector.h>
45
#include <wtf/WeakPtr.h>
45
46
46
namespace WebCore {
47
namespace WebCore {
47
class Event;
48
class Event;
Lines 54-62 class InspectorState; a/Source/WebCore/inspector/InspectorTimelineAgent.h_sec2
54
class InstrumentingAgents;
55
class InstrumentingAgents;
55
class IntRect;
56
class IntRect;
56
class KURL;
57
class KURL;
58
class Page;
57
class RenderObject;
59
class RenderObject;
58
class ResourceRequest;
60
class ResourceRequest;
59
class ResourceResponse;
61
class ResourceResponse;
62
class TimelineTraceEventProcessor;
60
63
61
typedef String ErrorString;
64
typedef String ErrorString;
62
65
Lines 176-181 public: a/Source/WebCore/inspector/InspectorTimelineAgent.h_sec3
176
    virtual void didResizeImage() OVERRIDE;
179
    virtual void didResizeImage() OVERRIDE;
177
180
178
private:
181
private:
182
    friend class TimelineTraceEventProcessor;
183
179
    struct TimelineRecordEntry {
184
    struct TimelineRecordEntry {
180
        TimelineRecordEntry(PassRefPtr<InspectorObject> record, PassRefPtr<InspectorObject> data, PassRefPtr<InspectorArray> children, const String& type, const String& frameId, size_t usedHeapSizeAtStart)
185
        TimelineRecordEntry(PassRefPtr<InspectorObject> record, PassRefPtr<InspectorObject> data, PassRefPtr<InspectorArray> children, const String& type, const String& frameId, size_t usedHeapSizeAtStart)
181
            : record(record), data(data), children(children), type(type), frameId(frameId), usedHeapSizeAtStart(usedHeapSizeAtStart)
186
            : record(record), data(data), children(children), type(type), frameId(frameId), usedHeapSizeAtStart(usedHeapSizeAtStart)
Lines 213-218 private: a/Source/WebCore/inspector/InspectorTimelineAgent.h_sec4
213
218
214
    double timestamp();
219
    double timestamp();
215
    double timestampFromMicroseconds(double microseconds);
220
    double timestampFromMicroseconds(double microseconds);
221
    Page* page();
216
222
217
    InspectorPageAgent* m_pageAgent;
223
    InspectorPageAgent* m_pageAgent;
218
    InspectorMemoryAgent* m_memoryAgent;
224
    InspectorMemoryAgent* m_memoryAgent;
Lines 239-244 private: a/Source/WebCore/inspector/InspectorTimelineAgent.h_sec5
239
    RefPtr<InspectorObject> m_pendingFrameRecord;
245
    RefPtr<InspectorObject> m_pendingFrameRecord;
240
    InspectorType m_inspectorType;
246
    InspectorType m_inspectorType;
241
    InspectorClient* m_client;
247
    InspectorClient* m_client;
248
    WeakPtrFactory<InspectorTimelineAgent> m_weakFactory;
249
    RefPtr<TimelineTraceEventProcessor> m_traceEventProcessor;
242
};
250
};
243
251
244
} // namespace WebCore
252
} // namespace WebCore
- a/Source/WebCore/inspector/TimelineTraceEventProcessor.cpp +204 lines
Line 0 a/Source/WebCore/inspector/TimelineTraceEventProcessor.cpp_sec1
1
/*
2
* Copyright (C) 2012 Google Inc. All rights reserved.
3
*
4
* Redistribution and use in source and binary forms, with or without
5
* modification, are permitted provided that the following conditions are
6
* met:
7
*
8
*     * Redistributions of source code must retain the above copyright
9
* notice, this list of conditions and the following disclaimer.
10
*     * Redistributions in binary form must reproduce the above
11
* copyright notice, this list of conditions and the following disclaimer
12
* in the documentation and/or other materials provided with the
13
* distribution.
14
*     * Neither the name of Google Inc. nor the names of its
15
* contributors may be used to endorse or promote products derived from
16
* this software without specific prior written permission.
17
*
18
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
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.
29
*/
30
31
#include "config.h"
32
33
#if ENABLE(INSPECTOR)
34
35
#include "TimelineTraceEventProcessor.h"
36
37
#include "InspectorClient.h"
38
#include "InspectorInstrumentation.h"
39
#include "InspectorTimelineAgent.h"
40
#include "TimelineRecordFactory.h"
41
42
#include <wtf/CurrentTime.h>
43
#include <wtf/MainThread.h>
44
#include <wtf/ThreadSpecific.h>
45
#include <wtf/Vector.h>
46
47
namespace WebCore {
48
49
namespace {
50
51
class TraceEventDispatcher {
52
    WTF_MAKE_NONCOPYABLE(TraceEventDispatcher);
53
public:
54
    static TraceEventDispatcher* instance()
55
    {
56
        DEFINE_STATIC_LOCAL(TraceEventDispatcher, instance, ());
57
        return &instance;
58
    }
59
60
    void addProcessor(TimelineTraceEventProcessor* processor, InspectorClient* client)
61
    {
62
        MutexLocker locker(m_mutex);
63
64
        m_processors.append(processor);
65
        if (m_processors.size() == 1)
66
            client->setTraceEventCallback(dispatchEventOnAnyThread);
67
    }
68
69
    void removeProcessor(TimelineTraceEventProcessor* processor, InspectorClient* client)
70
    {
71
        MutexLocker locker(m_mutex);
72
73
        size_t index = m_processors.find(processor);
74
        if (index == notFound) {
75
            ASSERT_NOT_REACHED();
76
            return;
77
        }
78
        m_processors[index] = m_processors.last();
79
        m_processors.removeLast();
80
        if (m_processors.isEmpty())
81
            client->setTraceEventCallback(0);
82
    }
83
84
private:
85
    TraceEventDispatcher() { }
86
87
    static void dispatchEventOnAnyThread(char phase, const unsigned char*, const char* name, unsigned long long id,
88
        int numArgs, const char* const* argNames, const unsigned char* argTypes, const unsigned long long* argValues,
89
        unsigned char flags)
90
    {
91
        TraceEventDispatcher* self = instance();
92
        Vector<RefPtr<TimelineTraceEventProcessor> > processors;
93
        {
94
            MutexLocker locker(self->m_mutex);
95
            processors = self->m_processors;
96
        }
97
        for (int i = 0, size = processors.size(); i < size; ++i) {
98
            processors[i]->processEventOnAnyThread(static_cast<TimelineTraceEventProcessor::TraceEventPhase>(phase),
99
                name, id, numArgs, argNames, argTypes, argValues, flags);
100
        }
101
    }
102
103
    Mutex m_mutex;
104
    Vector<RefPtr<TimelineTraceEventProcessor> > m_processors;
105
};
106
107
} // namespce
108
TimelineTraceEventProcessor::TimelineTraceEventProcessor(WeakPtr<InspectorTimelineAgent> timelineAgent, InspectorClient *client)
109
    : m_timelineAgent(timelineAgent)
110
    , m_inspectorClient(client)
111
    , m_pageId(reinterpret_cast<unsigned long long>(m_timelineAgent.get()->page()))
112
{
113
    TraceEventDispatcher::instance()->addProcessor(this, m_inspectorClient);
114
}
115
116
TimelineTraceEventProcessor::~TimelineTraceEventProcessor()
117
{
118
    TraceEventDispatcher::instance()->removeProcessor(this, m_inspectorClient);
119
}
120
121
const TimelineTraceEventProcessor::TraceValueUnion& TimelineTraceEventProcessor::TraceEvent::parameter(const char* name, TraceValueTypes expectedType) const
122
{
123
    static TraceValueUnion missingValue;
124
125
    for (int i = 0; i < m_argumentCount; ++i) {
126
        if (!strcmp(name, m_argumentNames[i])) {
127
            if (m_argumentTypes[i] != expectedType) {
128
                ASSERT_NOT_REACHED();
129
                return missingValue;
130
            }
131
            return *reinterpret_cast<const TraceValueUnion*>(m_argumentValues + i);
132
        }
133
    }
134
    ASSERT_NOT_REACHED();
135
    return missingValue;
136
}
137
138
void TimelineTraceEventProcessor::processEventOnAnyThread(TraceEventPhase phase, const char* name, unsigned long long,
139
    int numArgs, const char* const* argNames, const unsigned char* argTypes, const unsigned long long* argValues,
140
    unsigned char)
141
{
142
    HashMap<String, EventTypeEntry>::iterator it = m_handlersByType.find(name);
143
    if (it == m_handlersByType.end())
144
        return;
145
146
    TraceEvent event(WTF::monotonicallyIncreasingTime(), phase, name, currentThread(), numArgs, argNames, argTypes, argValues);
147
148
    if (!isMainThread()) {
149
        MutexLocker locker(m_backgroundEventsMutex);
150
        m_backgroundEvents.append(event);
151
        return;
152
    }
153
154
    processEvent(it->value, event);
155
}
156
157
void TimelineTraceEventProcessor::processEvent(const EventTypeEntry& eventTypeEntry, const TraceEvent& event)
158
{
159
    TraceEventHandler handler = 0;
160
    switch (event.phase()) {
161
    case TracePhaseBegin:
162
        handler = eventTypeEntry.m_begin;
163
        break;
164
    case TracePhaseEnd:
165
        handler = eventTypeEntry.m_end;
166
        break;
167
    case TracePhaseInstant:
168
        handler = eventTypeEntry.m_instant;
169
        break;
170
    default:
171
        ASSERT_NOT_REACHED();
172
    }
173
    if (!handler) {
174
        ASSERT_NOT_REACHED();
175
        return;
176
    }
177
    (this->*handler)(event);
178
}
179
180
void TimelineTraceEventProcessor::sendTimelineRecord(PassRefPtr<InspectorObject> data, const String& recordType, double startTime, double endTime, const String& thread)
181
{
182
    InspectorTimelineAgent* timelineAgent = m_timelineAgent.get();
183
    if (!timelineAgent)
184
        return;
185
    timelineAgent->appendBackgroundThreadRecord(data, recordType, startTime, endTime, thread);
186
}
187
188
void TimelineTraceEventProcessor::processBackgroundEvents()
189
{
190
    Vector<TraceEvent> events;
191
    {
192
        MutexLocker locker(m_backgroundEventsMutex);
193
        events.reserveCapacity(m_backgroundEvents.capacity());
194
        m_backgroundEvents.swap(events);
195
    }
196
    for (size_t i = 0, size = events.size(); i < size; ++i) {
197
        const TraceEvent& event = events[i];
198
        processEvent(m_handlersByType.find(event.name())->value, event);
199
    }
200
}
201
202
} // namespace WebCore
203
204
#endif // ENABLE(INSPECTOR)
- a/Source/WebCore/inspector/TimelineTraceEventProcessor.h +193 lines
Line 0 a/Source/WebCore/inspector/TimelineTraceEventProcessor.h_sec1
1
/*
2
* Copyright (C) 2013 Google Inc. All rights reserved.
3
*
4
* Redistribution and use in source and binary forms, with or without
5
* modification, are permitted provided that the following conditions are
6
* met:
7
*
8
*     * Redistributions of source code must retain the above copyright
9
* notice, this list of conditions and the following disclaimer.
10
*     * Redistributions in binary form must reproduce the above
11
* copyright notice, this list of conditions and the following disclaimer
12
* in the documentation and/or other materials provided with the
13
* distribution.
14
*     * Neither the name of Google Inc. nor the names of its
15
* contributors may be used to endorse or promote products derived from
16
* this software without specific prior written permission.
17
*
18
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
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.
29
*/
30
31
#ifndef TimelineTraceEventProcessor_h
32
#define TimelineTraceEventProcessor_h
33
34
#if ENABLE(INSPECTOR)
35
36
#include "InspectorValues.h"
37
38
#include <wtf/HashMap.h>
39
#include <wtf/HashSet.h>
40
#include <wtf/Noncopyable.h>
41
#include <wtf/Threading.h>
42
#include <wtf/Vector.h>
43
#include <wtf/WeakPtr.h>
44
#include <wtf/text/WTFString.h>
45
46
namespace WebCore {
47
48
class InspectorClient;
49
class InspectorTimelineAgent;
50
class Page;
51
52
class TimelineTraceEventProcessor : public ThreadSafeRefCounted<TimelineTraceEventProcessor> {
53
public:
54
    // FIXME: re-use definitions in TraceEvent.h once it's promoted to all platforms.
55
    enum TraceEventPhase {
56
        TracePhaseBegin = 'B',
57
        TracePhaseEnd = 'E',
58
        TracePhaseInstant = 'I'
59
    };
60
61
    TimelineTraceEventProcessor(WeakPtr<InspectorTimelineAgent>, InspectorClient*);
62
    ~TimelineTraceEventProcessor();
63
64
    void processEventOnAnyThread(TraceEventPhase, const char* name, unsigned long long id,
65
        int numArgs, const char* const* argNames, const unsigned char* argTypes, const unsigned long long* argValues,
66
        unsigned char flags);
67
68
private:
69
    // FIXME: use the definition in TraceEvent.h once we expose the latter to all plaforms.
70
    union TraceValueUnion {
71
        bool m_bool;
72
        unsigned long long m_uint;
73
        long long m_int;
74
        double m_double;
75
        const void* m_pointer;
76
        const char* m_string;
77
    };
78
79
    enum TraceValueTypes {
80
        TypeBool = 1,
81
        TypeUInt = 2,
82
        TypeInt = 3,
83
        TypeDouble = 4,
84
        TypePointer = 5,
85
        TypeString = 6,
86
        TypeCopyString = 7
87
    };
88
89
    class TraceEvent {
90
    public:
91
        TraceEvent()
92
            : m_argumentCount(0)
93
        {
94
        }
95
96
        TraceEvent(double timestamp, TraceEventPhase phase, const char* name, ThreadIdentifier threadIdentifier,
97
            int argumentCount, const char* const* argumentNames, const unsigned char* argumentTypes, const unsigned long long* argumentValues)
98
            : m_timestamp(timestamp)
99
            , m_phase(phase)
100
            , m_name(name)
101
            , m_threadIdentifier(threadIdentifier)
102
            , m_argumentCount(argumentCount)
103
            , m_argumentNames(argumentNames)
104
            , m_argumentTypes(argumentTypes)
105
            , m_argumentValues(argumentValues)
106
        {
107
        }
108
109
        double timestamp() const { return m_timestamp; }
110
        TraceEventPhase phase() const { return m_phase; }
111
        const char* name() const { return m_name; }
112
        ThreadIdentifier threadIdentifier() const { return m_threadIdentifier; }
113
        int argumentCount() const { return m_argumentCount; }
114
115
        bool asBool(const char* name) const
116
        {
117
            return parameter(name, TypeBool).m_bool;
118
        }
119
        long long asInt(const char* name) const
120
        {
121
            return parameter(name, TypeInt).m_int;
122
        }
123
        unsigned long long asUInt(const char* name) const
124
        {
125
            return parameter(name, TypeUInt).m_uint;
126
        }
127
        double asDouble(const char* name) const
128
        {
129
            return parameter(name, TypeDouble).m_double;
130
        }
131
        const char* asString(const char* name) const
132
        {
133
            return parameter(name, TypeString).m_string;
134
        }
135
136
    private:
137
        const TraceValueUnion& parameter(const char* name, TraceValueTypes expectedType) const;
138
139
        double m_timestamp;
140
        TraceEventPhase m_phase;
141
        const char* m_name;
142
        ThreadIdentifier m_threadIdentifier;
143
        int m_argumentCount;
144
        const char* const* m_argumentNames;
145
        const unsigned char* m_argumentTypes;
146
        const unsigned long long* m_argumentValues;
147
    };
148
149
    typedef void (TimelineTraceEventProcessor::*TraceEventHandler)(const TraceEvent&);
150
151
    struct EventTypeEntry {
152
        EventTypeEntry()
153
            : m_begin(0)
154
            , m_end(0)
155
            , m_instant(0)
156
        {
157
        }
158
        explicit EventTypeEntry(TraceEventHandler instant)
159
            : m_begin(0)
160
            , m_end(0)
161
            , m_instant(instant)
162
        {
163
        }
164
        EventTypeEntry(TraceEventHandler begin, TraceEventHandler end)
165
            : m_begin(begin)
166
            , m_end(end)
167
            , m_instant(0)
168
        {
169
        }
170
171
        TraceEventHandler m_begin;
172
        TraceEventHandler m_end;
173
        TraceEventHandler m_instant;
174
    };
175
176
    void processBackgroundEvents();
177
    void sendTimelineRecord(PassRefPtr<InspectorObject> data, const String& recordType, double startTime, double endTime, const String& thread);
178
    void processEvent(const EventTypeEntry&, const TraceEvent&);
179
180
    WeakPtr<InspectorTimelineAgent> m_timelineAgent;
181
    InspectorClient* m_inspectorClient;
182
183
    HashMap<String, EventTypeEntry> m_handlersByType;
184
    Mutex m_backgroundEventsMutex;
185
    Vector<TraceEvent> m_backgroundEvents;
186
    unsigned long long m_pageId;
187
};
188
189
190
} // namespace WebCore
191
192
#endif // ENABLE(INSPECTOR)
193
#endif // !defined(TimelineTraceEventProcessor_h)
- a/Source/WebKit/chromium/public/WebDevToolsAgentClient.h +6 lines
Lines 77-82 public: a/Source/WebKit/chromium/public/WebDevToolsAgentClient.h_sec1
77
    };
77
    };
78
    virtual void dumpUncountedAllocatedObjects(const InstrumentedObjectSizeProvider*) { }
78
    virtual void dumpUncountedAllocatedObjects(const InstrumentedObjectSizeProvider*) { }
79
79
80
    typedef void (*TraceEventCallback)(char phase, const unsigned char*, const char* name, unsigned long long id,
81
        int numArgs, const char* const* argNames, const unsigned char* argTypes, const unsigned long long* argValues,
82
        unsigned char flags);
83
84
    virtual void setTraceEventCallback(TraceEventCallback) { }
85
80
protected:
86
protected:
81
    ~WebDevToolsAgentClient() { }
87
    ~WebDevToolsAgentClient() { }
82
};
88
};
- a/Source/WebKit/chromium/src/InspectorClientImpl.cpp +6 lines
Lines 233-238 bool InspectorClientImpl::canSetFileInputFiles() a/Source/WebKit/chromium/src/InspectorClientImpl.cpp_sec1
233
    return true;
233
    return true;
234
}
234
}
235
235
236
void InspectorClientImpl::setTraceEventCallback(TraceEventCallback callback)
237
{
238
    if (WebDevToolsAgentImpl* agent = devToolsAgent())
239
        agent->setTraceEventCallback(callback);
240
}
241
236
WebDevToolsAgentImpl* InspectorClientImpl::devToolsAgent()
242
WebDevToolsAgentImpl* InspectorClientImpl::devToolsAgent()
237
{
243
{
238
    return static_cast<WebDevToolsAgentImpl*>(m_inspectedWebView->devToolsAgent());
244
    return static_cast<WebDevToolsAgentImpl*>(m_inspectedWebView->devToolsAgent());
- a/Source/WebKit/chromium/src/InspectorClientImpl.h +1 lines
Lines 91-96 public: a/Source/WebKit/chromium/src/InspectorClientImpl.h_sec1
91
    virtual void dumpUncountedAllocatedObjects(const HashMap<const void*, size_t>&);
91
    virtual void dumpUncountedAllocatedObjects(const HashMap<const void*, size_t>&);
92
92
93
    virtual bool captureScreenshot(WTF::String* data);
93
    virtual bool captureScreenshot(WTF::String* data);
94
    virtual void setTraceEventCallback(TraceEventCallback);
94
95
95
    virtual bool handleJavaScriptDialog(bool accept);
96
    virtual bool handleJavaScriptDialog(bool accept);
96
97
- a/Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp +5 lines
Lines 612-617 bool WebDevToolsAgentImpl::handleJavaScriptDialog(bool accept) a/Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp_sec1
612
    return true;
612
    return true;
613
}
613
}
614
614
615
void WebDevToolsAgentImpl::setTraceEventCallback(TraceEventCallback callback)
616
{
617
    m_client->setTraceEventCallback(callback);
618
}
619
615
void WebDevToolsAgentImpl::dispatchOnInspectorBackend(const WebString& message)
620
void WebDevToolsAgentImpl::dispatchOnInspectorBackend(const WebString& message)
616
{
621
{
617
    inspectorController()->dispatchMessageFromFrontend(message);
622
    inspectorController()->dispatchMessageFromFrontend(message);
- a/Source/WebKit/chromium/src/WebDevToolsAgentImpl.h +1 lines
Lines 114-119 public: a/Source/WebKit/chromium/src/WebDevToolsAgentImpl.h_sec1
114
114
115
    virtual void getAllocatedObjects(HashSet<const void*>&);
115
    virtual void getAllocatedObjects(HashSet<const void*>&);
116
    virtual void dumpUncountedAllocatedObjects(const HashMap<const void*, size_t>&);
116
    virtual void dumpUncountedAllocatedObjects(const HashMap<const void*, size_t>&);
117
    virtual void setTraceEventCallback(TraceEventCallback);
117
118
118
    virtual bool captureScreenshot(WTF::String* data);
119
    virtual bool captureScreenshot(WTF::String* data);
119
120

Return to Bug 105796