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

Side by Side Diff: Source/core/inspector/ScriptProfile.h

Issue 15816002: Remove console.profiles from window.console API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 7 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/core.gypi ('k') | Source/core/inspector/ScriptProfile.cpp » ('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) 2010, Google Inc. All rights reserved. 2 * Copyright (c) 2010, 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
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 14 matching lines...) Expand all
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 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. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef ScriptProfile_h 31 #ifndef ScriptProfile_h
32 #define ScriptProfile_h 32 #define ScriptProfile_h
33 33
34 #include "InspectorTypeBuilder.h" 34 #include "InspectorTypeBuilder.h"
35 #include "bindings/v8/ScriptWrappable.h"
36 #include "core/inspector/ScriptProfileNode.h"
37 #include "wtf/RefCounted.h" 35 #include "wtf/RefCounted.h"
38 #include "wtf/text/WTFString.h" 36 #include "wtf/text/WTFString.h"
39 37
40 namespace v8 { 38 namespace v8 {
41 class CpuProfile; 39 class CpuProfile;
42 } 40 }
43 41
44 namespace WebCore { 42 namespace WebCore {
45 43
46 class InspectorObject; 44 class InspectorObject;
47 45
48 class ScriptProfile : public RefCounted<ScriptProfile>, public ScriptWrappable { 46 class ScriptProfile : public RefCounted<ScriptProfile> {
49 public: 47 public:
50 static PassRefPtr<ScriptProfile> create(const v8::CpuProfile* profile, doubl e idleTime) 48 static PassRefPtr<ScriptProfile> create(const v8::CpuProfile* profile, doubl e idleTime)
51 { 49 {
52 return adoptRef(new ScriptProfile(profile, idleTime)); 50 return adoptRef(new ScriptProfile(profile, idleTime));
53 } 51 }
54 virtual ~ScriptProfile(); 52 virtual ~ScriptProfile();
55 53
56 String title() const; 54 String title() const;
57 unsigned int uid() const; 55 unsigned int uid() const;
58 PassRefPtr<ScriptProfileNode> head() const;
59 double idleTime() const; 56 double idleTime() const;
60 57
61 PassRefPtr<TypeBuilder::Profiler::CPUProfileNode> buildInspectorObjectForHea d() const; 58 PassRefPtr<TypeBuilder::Profiler::CPUProfileNode> buildInspectorObjectForHea d() const;
62 PassRefPtr<TypeBuilder::Array<int> > buildInspectorObjectForSamples() const; 59 PassRefPtr<TypeBuilder::Array<int> > buildInspectorObjectForSamples() const;
63 60
64 private: 61 private:
65 ScriptProfile(const v8::CpuProfile* profile, double idleTime) 62 ScriptProfile(const v8::CpuProfile* profile, double idleTime)
66 : m_profile(profile) 63 : m_profile(profile)
67 , m_idleTime(idleTime) 64 , m_idleTime(idleTime)
68 { 65 {
69 ScriptWrappable::init(this);
70 } 66 }
71 67
72 const v8::CpuProfile* m_profile; 68 const v8::CpuProfile* m_profile;
73 double m_idleTime; 69 double m_idleTime;
74 }; 70 };
75 71
76 } // namespace WebCore 72 } // namespace WebCore
77 73
78 #endif // ScriptProfile_h 74 #endif // ScriptProfile_h
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/inspector/ScriptProfile.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698