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

Side by Side Diff: Source/core/page/Performance.h

Issue 13912021: [Resource Timing] Expose redirect timing information (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Intel Inc. All rights reserved. 3 * Copyright (C) 2012 Intel Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include <wtf/PassRefPtr.h> 42 #include <wtf/PassRefPtr.h>
43 #include <wtf/RefCounted.h> 43 #include <wtf/RefCounted.h>
44 #include <wtf/RefPtr.h> 44 #include <wtf/RefPtr.h>
45 #include <wtf/text/WTFString.h> 45 #include <wtf/text/WTFString.h>
46 46
47 namespace WebCore { 47 namespace WebCore {
48 48
49 class Document; 49 class Document;
50 class ResourceRequest; 50 class ResourceRequest;
51 class ResourceResponse; 51 class ResourceResponse;
52 class ResourceTimingInfo;
52 class UserTiming; 53 class UserTiming;
53 54
54 class Performance : public ScriptWrappable, public RefCounted<Performance>, publ ic DOMWindowProperty, public EventTarget { 55 class Performance : public ScriptWrappable, public RefCounted<Performance>, publ ic DOMWindowProperty, public EventTarget {
55 public: 56 public:
56 static PassRefPtr<Performance> create(Frame* frame) { return adoptRef(new Pe rformance(frame)); } 57 static PassRefPtr<Performance> create(Frame* frame) { return adoptRef(new Pe rformance(frame)); }
57 ~Performance(); 58 ~Performance();
58 59
59 virtual const AtomicString& interfaceName() const; 60 virtual const AtomicString& interfaceName() const;
60 virtual ScriptExecutionContext* scriptExecutionContext() const; 61 virtual ScriptExecutionContext* scriptExecutionContext() const;
61 62
62 PassRefPtr<MemoryInfo> memory() const; 63 PassRefPtr<MemoryInfo> memory() const;
63 PerformanceNavigation* navigation() const; 64 PerformanceNavigation* navigation() const;
64 PerformanceTiming* timing() const; 65 PerformanceTiming* timing() const;
65 double now() const; 66 double now() const;
66 67
67 Vector<RefPtr<PerformanceEntry> > webkitGetEntries() const; 68 Vector<RefPtr<PerformanceEntry> > webkitGetEntries() const;
68 Vector<RefPtr<PerformanceEntry> > webkitGetEntriesByType(const String& entry Type); 69 Vector<RefPtr<PerformanceEntry> > webkitGetEntriesByType(const String& entry Type);
69 Vector<RefPtr<PerformanceEntry> > webkitGetEntriesByName(const String& name, const String& entryType); 70 Vector<RefPtr<PerformanceEntry> > webkitGetEntriesByName(const String& name, const String& entryType);
70 71
71 void webkitClearResourceTimings(); 72 void webkitClearResourceTimings();
72 void webkitSetResourceTimingBufferSize(unsigned int); 73 void webkitSetResourceTimingBufferSize(unsigned int);
73 74
74 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitresourcetimingbufferfull); 75 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitresourcetimingbufferfull);
75 76
76 void addResourceTiming(const String& initiatorName, Document*, const Resourc eRequest&, const ResourceResponse&, double initiationTime, double finishTime); 77 void addResourceTiming(const ResourceTimingInfo&, Document*);
77 78
78 using RefCounted<Performance>::ref; 79 using RefCounted<Performance>::ref;
79 using RefCounted<Performance>::deref; 80 using RefCounted<Performance>::deref;
80 81
81 void webkitMark(const String& markName, ExceptionCode&); 82 void webkitMark(const String& markName, ExceptionCode&);
82 void webkitClearMarks(const String& markName); 83 void webkitClearMarks(const String& markName);
83 84
84 void webkitMeasure(const String& measureName, const String& startMark, const String& endMark, ExceptionCode&); 85 void webkitMeasure(const String& measureName, const String& startMark, const String& endMark, ExceptionCode&);
85 void webkitClearMeasures(const String& measureName); 86 void webkitClearMeasures(const String& measureName);
86 87
(...skipping 13 matching lines...) Expand all
100 101
101 Vector<RefPtr<PerformanceEntry> > m_resourceTimingBuffer; 102 Vector<RefPtr<PerformanceEntry> > m_resourceTimingBuffer;
102 unsigned m_resourceTimingBufferSize; 103 unsigned m_resourceTimingBufferSize;
103 104
104 RefPtr<UserTiming> m_userTiming; 105 RefPtr<UserTiming> m_userTiming;
105 }; 106 };
106 107
107 } 108 }
108 109
109 #endif // Performance_h 110 #endif // Performance_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698