Commit b7dff976 authored by simonjam@chromium.org's avatar simonjam@chromium.org

[Web Timing] Add a vendor-prefixed Performance Timeline API

https://bugs.webkit.org/show_bug.cgi?id=80350

As described here: http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PerformanceTimeline/Overview.html

The API is there and should be correct, but it isn't particularly useful,
because nothing is populated. Upcoming changes will add Navigation Timing
and Resource Timing.

Reviewed by Tony Gentilcore.

No new tests. Functionality is disabled on all platforms.

* CMakeLists.txt: Added PerformanceEntry* files.
* DerivedSources.pri: Ditto.
* GNUmakefile.list.am: Ditto.
* WebCore.gypi: Ditto.
* WebCore.vcproj/WebCore.vcproj: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* page/Performance.cpp:
(WebCore::Performance::webkitGetEntries): Added.
(WebCore::Performance::webkitGetEntriesByType): Added.
(WebCore::Performance::webkitGetEntriesByName): Added.
* page/Performance.h:
(Performance):
* page/Performance.idl:
* page/PerformanceEntry.cpp: Added.
(WebCore):
(WebCore::PerformanceEntry::PerformanceEntry):
(WebCore::PerformanceEntry::name):
(WebCore::PerformanceEntry::entryType):
(WebCore::PerformanceEntry::startTime):
(WebCore::PerformanceEntry::duration):
* page/PerformanceEntry.h: Added.
(WebCore):
(PerformanceEntry):
* page/PerformanceEntry.idl: Added.
* page/PerformanceEntryList.cpp: Added.
(WebCore):
(WebCore::PerformanceEntryList::PerformanceEntryList):
(WebCore::PerformanceEntryList::~PerformanceEntryList):
(WebCore::PerformanceEntryList::length):
(WebCore::PerformanceEntryList::item):
(WebCore::PerformanceEntryList::append):
* page/PerformanceEntryList.h: Added.
(WebCore):
(PerformanceEntryList):
(WebCore::PerformanceEntryList::create):
* page/PerformanceEntryList.idl: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 2a950d3b
......@@ -374,6 +374,8 @@ SET(WebCore_IDL_FILES
page/MemoryInfo.idl
page/Navigator.idl
page/Performance.idl
page/PerformanceEntry.idl
page/PerformanceEntryList.idl
page/PerformanceNavigation.idl
page/PerformanceTiming.idl
page/Screen.idl
......@@ -1056,6 +1058,8 @@ SET(WebCore_SOURCES
page/PageSerializer.cpp
page/PageVisibilityState.cpp
page/Performance.cpp
page/PerformanceEntry.cpp
page/PerformanceEntryList.cpp
page/PerformanceNavigation.cpp
page/PerformanceTiming.cpp
page/PrintContext.cpp
......
2012-04-25 James Simonsen <simonjam@chromium.org>
[Web Timing] Add a vendor-prefixed Performance Timeline API
https://bugs.webkit.org/show_bug.cgi?id=80350
As described here: http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PerformanceTimeline/Overview.html
The API is there and should be correct, but it isn't particularly useful,
because nothing is populated. Upcoming changes will add Navigation Timing
and Resource Timing.
Reviewed by Tony Gentilcore.
No new tests. Functionality is disabled on all platforms.
* CMakeLists.txt: Added PerformanceEntry* files.
* DerivedSources.pri: Ditto.
* GNUmakefile.list.am: Ditto.
* WebCore.gypi: Ditto.
* WebCore.vcproj/WebCore.vcproj: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* page/Performance.cpp:
(WebCore::Performance::webkitGetEntries): Added.
(WebCore::Performance::webkitGetEntriesByType): Added.
(WebCore::Performance::webkitGetEntriesByName): Added.
* page/Performance.h:
(Performance):
* page/Performance.idl:
* page/PerformanceEntry.cpp: Added.
(WebCore):
(WebCore::PerformanceEntry::PerformanceEntry):
(WebCore::PerformanceEntry::name):
(WebCore::PerformanceEntry::entryType):
(WebCore::PerformanceEntry::startTime):
(WebCore::PerformanceEntry::duration):
* page/PerformanceEntry.h: Added.
(WebCore):
(PerformanceEntry):
* page/PerformanceEntry.idl: Added.
* page/PerformanceEntryList.cpp: Added.
(WebCore):
(WebCore::PerformanceEntryList::PerformanceEntryList):
(WebCore::PerformanceEntryList::~PerformanceEntryList):
(WebCore::PerformanceEntryList::length):
(WebCore::PerformanceEntryList::item):
(WebCore::PerformanceEntryList::append):
* page/PerformanceEntryList.h: Added.
(WebCore):
(PerformanceEntryList):
(WebCore::PerformanceEntryList::create):
* page/PerformanceEntryList.idl: Added.
2012-04-25 Benjamin Poulain <bpoulain@apple.com>
Move convertJSMethodNameToObjc() to be a utility function of ObjcClass
......@@ -411,6 +411,8 @@ IDL_BINDINGS += \
$$PWD/page/MemoryInfo.idl \
$$PWD/page/Navigator.idl \
$$PWD/page/Performance.idl \
$$PWD/page/PerformanceEntry.idl \
$$PWD/page/PerformanceEntryList.idl \
$$PWD/page/PerformanceNavigation.idl \
$$PWD/page/PerformanceTiming.idl \
$$PWD/page/Screen.idl \
......
......@@ -444,6 +444,10 @@ webcore_built_sources += \
DerivedSources/WebCore/JSPeerConnection00.h \
DerivedSources/WebCore/JSPerformance.cpp \
DerivedSources/WebCore/JSPerformance.h \
DerivedSources/WebCore/JSPerformanceEntry.cpp \
DerivedSources/WebCore/JSPerformanceEntry.h \
DerivedSources/WebCore/JSPerformanceEntryList.cpp \
DerivedSources/WebCore/JSPerformanceEntryList.h \
DerivedSources/WebCore/JSPerformanceNavigation.cpp \
DerivedSources/WebCore/JSPerformanceNavigation.h \
DerivedSources/WebCore/JSPerformanceTiming.cpp \
......@@ -938,6 +942,8 @@ dom_binding_idls += \
$(WebCore)/page/MemoryInfo.idl \
$(WebCore)/page/Navigator.idl \
$(WebCore)/page/Performance.idl \
$(WebCore)/page/PerformanceEntry.idl \
$(WebCore)/page/PerformanceEntryList.idl \
$(WebCore)/page/PerformanceNavigation.idl \
$(WebCore)/page/PerformanceTiming.idl \
$(WebCore)/page/Screen.idl \
......@@ -2979,6 +2985,10 @@ webcore_sources += \
Source/WebCore/page/PageVisibilityState.h \
Source/WebCore/page/Performance.cpp \
Source/WebCore/page/Performance.h \
Source/WebCore/page/PerformanceEntry.cpp \
Source/WebCore/page/PerformanceEntry.h \
Source/WebCore/page/PerformanceEntryList.cpp \
Source/WebCore/page/PerformanceEntryList.h \
Source/WebCore/page/PerformanceNavigation.cpp \
Source/WebCore/page/PerformanceNavigation.h \
Source/WebCore/page/PerformanceTiming.cpp \
......
......@@ -1032,6 +1032,8 @@ SOURCES += \
page/PageGroupLoadDeferrer.cpp \
page/PageVisibilityState.cpp \
page/Performance.cpp \
page/PerformanceEntry.cpp \
page/PerformanceEntryList.cpp \
page/PerformanceNavigation.cpp \
page/PerformanceTiming.cpp \
page/PrintContext.cpp \
......
......@@ -1144,6 +1144,8 @@
'page/Navigator.idl',
'page/NavigatorRegisterProtocolHandler.idl',
'page/Performance.idl',
'page/PerformanceEntry.idl',
'page/PerformanceEntryList.idl',
'page/PerformanceNavigation.idl',
'page/PerformanceTiming.idl',
'page/PointerLock.idl',
......@@ -3007,6 +3009,10 @@
'page/PageVisibilityState.cpp',
'page/Performance.cpp',
'page/Performance.h',
'page/PerformanceEntry.cpp',
'page/PerformanceEntry.h',
'page/PerformanceEntryList.cpp',
'page/PerformanceEntryList.h',
'page/PerformanceNavigation.cpp',
'page/PerformanceNavigation.h',
'page/PerformanceTiming.cpp',
......@@ -7660,6 +7666,10 @@
'<(PRODUCT_DIR)/DerivedSources/WebCore/JSPageTransitionEvent.h',
'<(PRODUCT_DIR)/DerivedSources/WebCore/JSPerformance.cpp',
'<(PRODUCT_DIR)/DerivedSources/WebCore/JSPerformance.h',
'<(PRODUCT_DIR)/DerivedSources/WebCore/JSPerformanceEntry.cpp',
'<(PRODUCT_DIR)/DerivedSources/WebCore/JSPerformanceEntry.h',
'<(PRODUCT_DIR)/DerivedSources/WebCore/JSPerformanceEntryList.cpp',
'<(PRODUCT_DIR)/DerivedSources/WebCore/JSPerformanceEntryList.h',
'<(PRODUCT_DIR)/DerivedSources/WebCore/JSPerformanceNavigation.cpp',
'<(PRODUCT_DIR)/DerivedSources/WebCore/JSPerformanceNavigation.h',
'<(PRODUCT_DIR)/DerivedSources/WebCore/JSPerformanceTiming.cpp',
......
......@@ -12209,6 +12209,118 @@
RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSPerformance.h"
>
</File>
<File
RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSPerformanceEntry.cpp"
>
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug_Cairo_CFLite|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release_Cairo_CFLite|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug_All|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Production|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File>
<File
RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSPerformanceEntry.h"
>
</File>
<File
RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSPerformanceEntryList.cpp"
>
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug_Cairo_CFLite|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release_Cairo_CFLite|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug_All|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Production|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File>
<File
RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSPerformanceEntryList.h"
>
</File>
<File
RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSPerformanceNavigation.cpp"
>
......@@ -26365,6 +26477,22 @@
RelativePath="..\page\Performance.h"
>
</File>
<File
RelativePath="..\page\PerformanceEntry.cpp"
>
</File>
<File
RelativePath="..\page\PerformanceEntry.h"
>
</File>
<File
RelativePath="..\page\PerformanceEntryList.cpp"
>
</File>
<File
RelativePath="..\page\PerformanceEntryList.h"
>
</File>
<File
RelativePath="..\page\PerformanceNavigation.cpp"
>
......@@ -2866,6 +2866,10 @@
861C2EA413FB4FDD00062ABB /* DocumentLoadTiming.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 861C2EA313FB4FDD00062ABB /* DocumentLoadTiming.cpp */; };
861C2EA613FB4FFF00062ABB /* ResourceLoadTiming.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 861C2EA513FB4FFF00062ABB /* ResourceLoadTiming.cpp */; };
86243D0111BC31F700CC006A /* JSArrayBufferViewHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 86243D0011BC31F700CC006A /* JSArrayBufferViewHelper.h */; };
86BE340015058CB200CE0FD8 /* PerformanceEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86BE33FA15058CB200CE0FD8 /* PerformanceEntry.cpp */; };
86BE340115058CB200CE0FD8 /* PerformanceEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = 86BE33FB15058CB200CE0FD8 /* PerformanceEntry.h */; };
86BE340315058CB200CE0FD8 /* PerformanceEntryList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86BE33FD15058CB200CE0FD8 /* PerformanceEntryList.cpp */; };
86BE340415058CB200CE0FD8 /* PerformanceEntryList.h in Headers */ = {isa = PBXBuildFile; fileRef = 86BE33FE15058CB200CE0FD8 /* PerformanceEntryList.h */; };
86D982F7125C154000AD9E3D /* DocumentTiming.h in Headers */ = {isa = PBXBuildFile; fileRef = 86D982F6125C154000AD9E3D /* DocumentTiming.h */; settings = {ATTRIBUTES = (Private, ); }; };
890AE0E11256A07900F5968C /* DirectoryReaderBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 890AE0E01256A07900F5968C /* DirectoryReaderBase.h */; };
892CF192134C620D00AAEDA1 /* StorageInfoErrorCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 892CF18D134C620D00AAEDA1 /* StorageInfoErrorCallback.h */; };
......@@ -9843,6 +9847,12 @@
861C2EA313FB4FDD00062ABB /* DocumentLoadTiming.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentLoadTiming.cpp; sourceTree = "<group>"; };
861C2EA513FB4FFF00062ABB /* ResourceLoadTiming.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceLoadTiming.cpp; sourceTree = "<group>"; };
86243D0011BC31F700CC006A /* JSArrayBufferViewHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSArrayBufferViewHelper.h; sourceTree = "<group>"; };
86BE33FA15058CB200CE0FD8 /* PerformanceEntry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PerformanceEntry.cpp; sourceTree = "<group>"; };
86BE33FB15058CB200CE0FD8 /* PerformanceEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PerformanceEntry.h; sourceTree = "<group>"; };
86BE33FC15058CB200CE0FD8 /* PerformanceEntry.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PerformanceEntry.idl; sourceTree = "<group>"; };
86BE33FD15058CB200CE0FD8 /* PerformanceEntryList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PerformanceEntryList.cpp; sourceTree = "<group>"; };
86BE33FE15058CB200CE0FD8 /* PerformanceEntryList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PerformanceEntryList.h; sourceTree = "<group>"; };
86BE33FF15058CB200CE0FD8 /* PerformanceEntryList.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PerformanceEntryList.idl; sourceTree = "<group>"; };
86D982F6125C154000AD9E3D /* DocumentTiming.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentTiming.h; sourceTree = "<group>"; };
890AE0E01256A07900F5968C /* DirectoryReaderBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DirectoryReaderBase.h; path = Modules/filesystem/DirectoryReaderBase.h; sourceTree = "<group>"; };
892CF18D134C620D00AAEDA1 /* StorageInfoErrorCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageInfoErrorCallback.h; sourceTree = "<group>"; };
......@@ -15421,6 +15431,12 @@
8A844D0111D3C18E0014065C /* Performance.cpp */,
8A844D0211D3C18E0014065C /* Performance.h */,
8A844D0311D3C18E0014065C /* Performance.idl */,
86BE33FA15058CB200CE0FD8 /* PerformanceEntry.cpp */,
86BE33FB15058CB200CE0FD8 /* PerformanceEntry.h */,
86BE33FC15058CB200CE0FD8 /* PerformanceEntry.idl */,
86BE33FD15058CB200CE0FD8 /* PerformanceEntryList.cpp */,
86BE33FE15058CB200CE0FD8 /* PerformanceEntryList.h */,
86BE33FF15058CB200CE0FD8 /* PerformanceEntryList.idl */,
8AF4E55211DC5A36000ED3DE /* PerformanceNavigation.cpp */,
8AF4E55311DC5A36000ED3DE /* PerformanceNavigation.h */,
8AF4E55411DC5A36000ED3DE /* PerformanceNavigation.idl */,
......@@ -23850,6 +23866,8 @@
B27535650B053814002CE64F /* PDFDocumentImage.h in Headers */,
8A7CC96B12076D73001D4588 /* PendingScript.h in Headers */,
8A844D0511D3C18E0014065C /* Performance.h in Headers */,
86BE340115058CB200CE0FD8 /* PerformanceEntry.h in Headers */,
86BE340415058CB200CE0FD8 /* PerformanceEntryList.h in Headers */,
8AF4E55611DC5A36000ED3DE /* PerformanceNavigation.h in Headers */,
8AF4E55C11DC5A63000ED3DE /* PerformanceTiming.h in Headers */,
49D5DC2E0F423A73008F20FD /* PerspectiveTransformOperation.h in Headers */,
......@@ -27049,6 +27067,8 @@
B27535640B053814002CE64F /* PDFDocumentImage.cpp in Sources */,
8A7CC97012076F8A001D4588 /* PendingScript.cpp in Sources */,
8A844D0411D3C18E0014065C /* Performance.cpp in Sources */,
86BE340015058CB200CE0FD8 /* PerformanceEntry.cpp in Sources */,
86BE340315058CB200CE0FD8 /* PerformanceEntryList.cpp in Sources */,
8AF4E55511DC5A36000ED3DE /* PerformanceNavigation.cpp in Sources */,
8AF4E55B11DC5A63000ED3DE /* PerformanceTiming.cpp in Sources */,
49D5DC2D0F423A73008F20FD /* PerspectiveTransformOperation.cpp in Sources */,
......@@ -67,6 +67,28 @@ PerformanceTiming* Performance::timing() const
return m_timing.get();
}
#if ENABLE(PERFORMANCE_TIMELINE)
PassRefPtr<PerformanceEntryList> Performance::webkitGetEntries() const
{
RefPtr<PerformanceEntryList> entries = PerformanceEntryList::create();
return entries;
}
PassRefPtr<PerformanceEntryList> Performance::webkitGetEntriesByType(const String&)
{
RefPtr<PerformanceEntryList> entries = PerformanceEntryList::create();
return entries;
}
PassRefPtr<PerformanceEntryList> Performance::webkitGetEntriesByName(const String&, const String&)
{
RefPtr<PerformanceEntryList> entries = PerformanceEntryList::create();
return entries;
}
#endif // ENABLE(PERFORMANCE_TIMELINE)
} // namespace WebCore
#endif // ENABLE(WEB_TIMING)
......@@ -35,11 +35,13 @@
#include "DOMWindowProperty.h"
#include "MemoryInfo.h"
#include "PerformanceEntryList.h"
#include "PerformanceNavigation.h"
#include "PerformanceTiming.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
#include <wtf/RefPtr.h>
#include <wtf/text/WTFString.h>
namespace WebCore {
......@@ -51,6 +53,12 @@ public:
PerformanceNavigation* navigation() const;
PerformanceTiming* timing() const;
#if ENABLE(PERFORMANCE_TIMELINE)
PassRefPtr<PerformanceEntryList> webkitGetEntries() const;
PassRefPtr<PerformanceEntryList> webkitGetEntriesByType(const String& entryType);
PassRefPtr<PerformanceEntryList> webkitGetEntriesByName(const String& name, const String& entryType);
#endif
private:
explicit Performance(Frame*);
......
......@@ -38,6 +38,12 @@ module window {
readonly attribute PerformanceNavigation navigation;
readonly attribute PerformanceTiming timing;
readonly attribute [V8CustomGetter] MemoryInfo memory;
#if defined(ENABLE_PERFORMANCE_TIMELINE) && ENABLE_PERFORMANCE_TIMELINE
PerformanceEntryList webkitGetEntries();
PerformanceEntryList webkitGetEntriesByType(in DOMString entryType);
PerformanceEntryList webkitGetEntriesByName(in DOMString name, in [Optional=DefaultIsNullString] DOMString entryType);
#endif
};
}
/*
* Copyright (C) 2012 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include "PerformanceEntry.h"
#if ENABLE(WEB_TIMING) && ENABLE(PERFORMANCE_TIMELINE)
namespace WebCore {
PerformanceEntry::PerformanceEntry(const String& name, const String& entryType, double startTime, double duration)
: m_name(name)
, m_entryType(entryType)
, m_startTime(startTime)
, m_duration(duration)
{
}
String PerformanceEntry::name() const
{
return m_name;
}
String PerformanceEntry::entryType() const
{
return m_entryType;
}
double PerformanceEntry::startTime() const
{
return m_startTime;
}
double PerformanceEntry::duration() const
{
return m_duration;
}
} // namespace WebCore
#endif // ENABLE(WEB_TIMING) && ENABLE(PERFORMANCE_TIMELINE)
/*
* Copyright (C) 2012 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef PerformanceEntry_h
#define PerformanceEntry_h
#if ENABLE(WEB_TIMING) && ENABLE(PERFORMANCE_TIMELINE)
#include "Performance.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
#include <wtf/text/WTFString.h>
namespace WebCore {
class PerformanceEntry : public RefCounted<PerformanceEntry> {
public:
String name() const;
String entryType() const;
double startTime() const;
double duration() const;
protected:
PerformanceEntry(const String& name, const String& entryType, double startTime, double duration);
private:
const String m_name;
const String m_entryType;
const double m_startTime;
const double m_duration;
};
}
#endif // !ENABLE(WEB_TIMING) && ENABLE(PERFORMANCE_TIMELINE)
#endif // !defined(PerformanceEntry_h)
/*
* Copyright (C) 2012 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
module window {
// See: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PerformanceTimeline/Overview.html
interface [
Conditional=WEB_TIMING,
Conditional=PERFORMANCE_TIMELINE,
OmitConstructor
] PerformanceEntry {
readonly attribute DOMString name;
readonly attribute DOMString entryType;
readonly attribute double startTime;
readonly attribute double duration;
};
}
/*
* Copyright (C) 2012 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include "PerformanceEntryList.h"
#if ENABLE(WEB_TIMING) && ENABLE(PERFORMANCE_TIMELINE)
#include "PerformanceEntry.h"
namespace WebCore {
PerformanceEntryList::PerformanceEntryList()
{
}