OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google 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 | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. 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 29 matching lines...) Expand all Loading... |
40 #include "wtf/Forward.h" | 40 #include "wtf/Forward.h" |
41 | 41 |
42 namespace blink { | 42 namespace blink { |
43 | 43 |
44 class ConsoleMessage; | 44 class ConsoleMessage; |
45 class ScriptArguments; | 45 class ScriptArguments; |
46 | 46 |
47 class CORE_EXPORT ConsoleBase : public GarbageCollectedFinalized<ConsoleBase>, p
ublic ScriptWrappable { | 47 class CORE_EXPORT ConsoleBase : public GarbageCollectedFinalized<ConsoleBase>, p
ublic ScriptWrappable { |
48 DEFINE_WRAPPERTYPEINFO(); | 48 DEFINE_WRAPPERTYPEINFO(); |
49 public: | 49 public: |
50 void debug(ScriptState*, ScriptArguments*); | |
51 void error(ScriptState*, ScriptArguments*); | |
52 void info(ScriptState*, ScriptArguments*); | |
53 void log(ScriptState*, ScriptArguments*); | |
54 void clear(ScriptState*, ScriptArguments*); | |
55 void warn(ScriptState*, ScriptArguments*); | |
56 void dir(ScriptState*, ScriptArguments*); | |
57 void dirxml(ScriptState*, ScriptArguments*); | |
58 void table(ScriptState*, ScriptArguments*); | |
59 void trace(ScriptState*, ScriptArguments*); | |
60 void assertCondition(ScriptState*, ScriptArguments*, bool condition); | |
61 void count(ScriptState*, ScriptArguments*); | 50 void count(ScriptState*, ScriptArguments*); |
62 void markTimeline(const String&); | |
63 void profile(const String&); | |
64 void profileEnd(const String&); | |
65 void time(const String&); | 51 void time(const String&); |
66 void timeEnd(ScriptState*, const String&); | 52 void timeEnd(ScriptState*, const String&); |
67 void timeStamp(const String&); | |
68 void timeline(ScriptState*, const String&); | |
69 void timelineEnd(ScriptState*, const String&); | |
70 void group(ScriptState*, ScriptArguments*); | |
71 void groupCollapsed(ScriptState*, ScriptArguments*); | |
72 void groupEnd(); | |
73 | 53 |
74 DEFINE_INLINE_VIRTUAL_TRACE() { } | 54 DEFINE_INLINE_VIRTUAL_TRACE() { } |
75 | 55 |
76 virtual ~ConsoleBase(); | 56 virtual ~ConsoleBase(); |
77 | |
78 protected: | |
79 virtual ExecutionContext* context() = 0; | |
80 virtual void reportMessageToConsole(ConsoleMessage*) = 0; | 57 virtual void reportMessageToConsole(ConsoleMessage*) = 0; |
81 | |
82 private: | 58 private: |
83 void internalAddMessage(MessageType, MessageLevel, ScriptState*, ScriptArgum
ents*, bool acceptNoArguments = false); | |
84 | |
85 HashCountedSet<String> m_counts; | 59 HashCountedSet<String> m_counts; |
86 HashMap<String, double> m_times; | 60 HashMap<String, double> m_times; |
87 }; | 61 }; |
88 | 62 |
89 } // namespace blink | 63 } // namespace blink |
90 | 64 |
91 #endif // ConsoleBase_h | 65 #endif // ConsoleBase_h |
OLD | NEW |