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

Side by Side Diff: Source/core/timing/PerformanceEntry.h

Issue 478243002: bindings: Adds virtual ScriptWrappable::wrap method. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 6 years, 3 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
« no previous file with comments | « Source/core/timing/Performance.h ('k') | Source/core/timing/PerformanceMark.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 23 matching lines...) Expand all
34 34
35 #include "bindings/core/v8/ScriptWrappable.h" 35 #include "bindings/core/v8/ScriptWrappable.h"
36 #include "platform/heap/Handle.h" 36 #include "platform/heap/Handle.h"
37 #include "wtf/PassRefPtr.h" 37 #include "wtf/PassRefPtr.h"
38 #include "wtf/RefCounted.h" 38 #include "wtf/RefCounted.h"
39 #include "wtf/text/WTFString.h" 39 #include "wtf/text/WTFString.h"
40 40
41 namespace blink { 41 namespace blink {
42 42
43 class PerformanceEntry : public RefCountedWillBeGarbageCollectedFinalized<Perfor manceEntry>, public ScriptWrappable { 43 class PerformanceEntry : public RefCountedWillBeGarbageCollectedFinalized<Perfor manceEntry>, public ScriptWrappable {
44 DEFINE_WRAPPERTYPEINFO();
44 public: 45 public:
45 virtual ~PerformanceEntry(); 46 virtual ~PerformanceEntry();
46 47
47 String name() const; 48 String name() const;
48 String entryType() const; 49 String entryType() const;
49 double startTime() const; 50 double startTime() const;
50 double duration() const; 51 double duration() const;
51 52
52 virtual bool isResource() { return false; } 53 virtual bool isResource() { return false; }
53 virtual bool isMark() { return false; } 54 virtual bool isMark() { return false; }
54 virtual bool isMeasure() { return false; } 55 virtual bool isMeasure() { return false; }
55 56
56 static bool startTimeCompareLessThan(PassRefPtrWillBeRawPtr<PerformanceEntry > a, PassRefPtrWillBeRawPtr<PerformanceEntry> b) 57 static bool startTimeCompareLessThan(PassRefPtrWillBeRawPtr<PerformanceEntry > a, PassRefPtrWillBeRawPtr<PerformanceEntry> b)
57 { 58 {
58 return a->startTime() < b->startTime(); 59 return a->startTime() < b->startTime();
59 } 60 }
60 61
61 virtual void trace(Visitor*) { } 62 virtual void trace(Visitor*) { }
62 63
63 protected: 64 protected:
64 PerformanceEntry(const String& name, const String& entryType, double startTi me, double finishTime); 65 PerformanceEntry(const String& name, const String& entryType, double startTi me, double finishTime);
65 66
66 private: 67 private:
67 const String m_name; 68 const String m_name;
68 const String m_entryType; 69 const String m_entryType;
69 const double m_startTime; 70 const double m_startTime;
70 const double m_duration; 71 const double m_duration;
71 }; 72 };
72 73
73 } 74 } // namespace blink
74 75
75 #endif // !defined(PerformanceEntry_h) 76 #endif // PerformanceEntry_h
OLDNEW
« no previous file with comments | « Source/core/timing/Performance.h ('k') | Source/core/timing/PerformanceMark.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698