OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 13 matching lines...) Expand all Loading... |
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 */ | 27 */ |
28 | 28 |
29 #ifndef Console_h | 29 #ifndef Console_h |
30 #define Console_h | 30 #define Console_h |
31 | 31 |
32 #include "bindings/v8/ScriptState.h" | 32 #include "bindings/v8/ScriptState.h" |
33 #include "bindings/v8/ScriptWrappable.h" | 33 #include "bindings/v8/ScriptWrappable.h" |
34 #include "core/inspector/ScriptProfile.h" | |
35 #include "core/page/DOMWindowProperty.h" | 34 #include "core/page/DOMWindowProperty.h" |
36 #include <wtf/Forward.h> | 35 #include <wtf/Forward.h> |
37 #include <wtf/PassRefPtr.h> | 36 #include <wtf/PassRefPtr.h> |
38 #include <wtf/RefCounted.h> | 37 #include <wtf/RefCounted.h> |
39 | 38 |
40 namespace WebCore { | 39 namespace WebCore { |
41 | 40 |
42 class Frame; | 41 class Frame; |
43 class MemoryInfo; | 42 class MemoryInfo; |
44 class Page; | 43 class Page; |
45 class ScriptArguments; | 44 class ScriptArguments; |
46 | 45 |
47 typedef Vector<RefPtr<ScriptProfile> > ProfilesArray; | |
48 | |
49 class Console : public ScriptWrappable, public RefCounted<Console>, public DOMWi
ndowProperty { | 46 class Console : public ScriptWrappable, public RefCounted<Console>, public DOMWi
ndowProperty { |
50 public: | 47 public: |
51 static PassRefPtr<Console> create(Frame* frame) { return adoptRef(new Consol
e(frame)); } | 48 static PassRefPtr<Console> create(Frame* frame) { return adoptRef(new Consol
e(frame)); } |
52 virtual ~Console(); | 49 virtual ~Console(); |
53 | 50 |
54 void debug(ScriptState*, PassRefPtr<ScriptArguments>); | 51 void debug(ScriptState*, PassRefPtr<ScriptArguments>); |
55 void error(ScriptState*, PassRefPtr<ScriptArguments>); | 52 void error(ScriptState*, PassRefPtr<ScriptArguments>); |
56 void info(ScriptState*, PassRefPtr<ScriptArguments>); | 53 void info(ScriptState*, PassRefPtr<ScriptArguments>); |
57 void log(ScriptState*, PassRefPtr<ScriptArguments>); | 54 void log(ScriptState*, PassRefPtr<ScriptArguments>); |
58 void clear(ScriptState*, PassRefPtr<ScriptArguments>); | 55 void clear(ScriptState*, PassRefPtr<ScriptArguments>); |
59 void warn(ScriptState*, PassRefPtr<ScriptArguments>); | 56 void warn(ScriptState*, PassRefPtr<ScriptArguments>); |
60 void dir(ScriptState*, PassRefPtr<ScriptArguments>); | 57 void dir(ScriptState*, PassRefPtr<ScriptArguments>); |
61 void dirxml(ScriptState*, PassRefPtr<ScriptArguments>); | 58 void dirxml(ScriptState*, PassRefPtr<ScriptArguments>); |
62 void table(ScriptState*, PassRefPtr<ScriptArguments>); | 59 void table(ScriptState*, PassRefPtr<ScriptArguments>); |
63 void trace(ScriptState*, PassRefPtr<ScriptArguments>); | 60 void trace(ScriptState*, PassRefPtr<ScriptArguments>); |
64 void assertCondition(ScriptState*, PassRefPtr<ScriptArguments>, bool conditi
on); | 61 void assertCondition(ScriptState*, PassRefPtr<ScriptArguments>, bool conditi
on); |
65 void count(ScriptState*, PassRefPtr<ScriptArguments>); | 62 void count(ScriptState*, PassRefPtr<ScriptArguments>); |
66 void markTimeline(PassRefPtr<ScriptArguments>); | 63 void markTimeline(PassRefPtr<ScriptArguments>); |
67 const ProfilesArray& profiles() const { return m_profiles; } | |
68 void profile(ScriptState*, const String&); | 64 void profile(ScriptState*, const String&); |
69 void profileEnd(ScriptState*, const String&); | 65 void profileEnd(ScriptState*, const String&); |
70 void time(const String&); | 66 void time(const String&); |
71 void timeEnd(ScriptState*, const String&); | 67 void timeEnd(ScriptState*, const String&); |
72 void timeStamp(PassRefPtr<ScriptArguments>); | 68 void timeStamp(PassRefPtr<ScriptArguments>); |
73 void group(ScriptState*, PassRefPtr<ScriptArguments>); | 69 void group(ScriptState*, PassRefPtr<ScriptArguments>); |
74 void groupCollapsed(ScriptState*, PassRefPtr<ScriptArguments>); | 70 void groupCollapsed(ScriptState*, PassRefPtr<ScriptArguments>); |
75 void groupEnd(); | 71 void groupEnd(); |
76 | 72 |
77 PassRefPtr<MemoryInfo> memory() const; | 73 PassRefPtr<MemoryInfo> memory() const; |
78 | 74 |
79 private: | 75 private: |
80 inline Page* page() const; | 76 inline Page* page() const; |
81 | 77 |
82 explicit Console(Frame*); | 78 explicit Console(Frame*); |
83 | |
84 ProfilesArray m_profiles; | |
85 }; | 79 }; |
86 | 80 |
87 } // namespace WebCore | 81 } // namespace WebCore |
88 | 82 |
89 #endif // Console_h | 83 #endif // Console_h |
OLD | NEW |