| 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 28 matching lines...) Expand all Loading... |
| 39 #include "wtf/Forward.h" | 39 #include "wtf/Forward.h" |
| 40 | 40 |
| 41 namespace blink { | 41 namespace blink { |
| 42 | 42 |
| 43 class ConsoleMessage; | 43 class ConsoleMessage; |
| 44 class ScriptArguments; | 44 class ScriptArguments; |
| 45 | 45 |
| 46 class ConsoleBase : public GarbageCollectedFinalized<ConsoleBase>, public Script
Wrappable { | 46 class ConsoleBase : public GarbageCollectedFinalized<ConsoleBase>, public Script
Wrappable { |
| 47 DEFINE_WRAPPERTYPEINFO(); | 47 DEFINE_WRAPPERTYPEINFO(); |
| 48 public: | 48 public: |
| 49 void debug(ScriptState*, PassRefPtrWillBeRawPtr<ScriptArguments>); | 49 void debug(ScriptState*, RawPtr<ScriptArguments>); |
| 50 void error(ScriptState*, PassRefPtrWillBeRawPtr<ScriptArguments>); | 50 void error(ScriptState*, RawPtr<ScriptArguments>); |
| 51 void info(ScriptState*, PassRefPtrWillBeRawPtr<ScriptArguments>); | 51 void info(ScriptState*, RawPtr<ScriptArguments>); |
| 52 void log(ScriptState*, PassRefPtrWillBeRawPtr<ScriptArguments>); | 52 void log(ScriptState*, RawPtr<ScriptArguments>); |
| 53 void clear(ScriptState*, PassRefPtrWillBeRawPtr<ScriptArguments>); | 53 void clear(ScriptState*, RawPtr<ScriptArguments>); |
| 54 void warn(ScriptState*, PassRefPtrWillBeRawPtr<ScriptArguments>); | 54 void warn(ScriptState*, RawPtr<ScriptArguments>); |
| 55 void dir(ScriptState*, PassRefPtrWillBeRawPtr<ScriptArguments>); | 55 void dir(ScriptState*, RawPtr<ScriptArguments>); |
| 56 void dirxml(ScriptState*, PassRefPtrWillBeRawPtr<ScriptArguments>); | 56 void dirxml(ScriptState*, RawPtr<ScriptArguments>); |
| 57 void table(ScriptState*, PassRefPtrWillBeRawPtr<ScriptArguments>); | 57 void table(ScriptState*, RawPtr<ScriptArguments>); |
| 58 void trace(ScriptState*, PassRefPtrWillBeRawPtr<ScriptArguments>); | 58 void trace(ScriptState*, RawPtr<ScriptArguments>); |
| 59 void assertCondition(ScriptState*, PassRefPtrWillBeRawPtr<ScriptArguments>,
bool condition); | 59 void assertCondition(ScriptState*, RawPtr<ScriptArguments>, bool condition); |
| 60 void count(ScriptState*, PassRefPtrWillBeRawPtr<ScriptArguments>); | 60 void count(ScriptState*, RawPtr<ScriptArguments>); |
| 61 void markTimeline(const String&); | 61 void markTimeline(const String&); |
| 62 void profile(const String&); | 62 void profile(const String&); |
| 63 void profileEnd(const String&); | 63 void profileEnd(const String&); |
| 64 void time(const String&); | 64 void time(const String&); |
| 65 void timeEnd(ScriptState*, const String&); | 65 void timeEnd(ScriptState*, const String&); |
| 66 void timeStamp(const String&); | 66 void timeStamp(const String&); |
| 67 void timeline(ScriptState*, const String&); | 67 void timeline(ScriptState*, const String&); |
| 68 void timelineEnd(ScriptState*, const String&); | 68 void timelineEnd(ScriptState*, const String&); |
| 69 void group(ScriptState*, PassRefPtrWillBeRawPtr<ScriptArguments>); | 69 void group(ScriptState*, RawPtr<ScriptArguments>); |
| 70 void groupCollapsed(ScriptState*, PassRefPtrWillBeRawPtr<ScriptArguments>); | 70 void groupCollapsed(ScriptState*, RawPtr<ScriptArguments>); |
| 71 void groupEnd(); | 71 void groupEnd(); |
| 72 | 72 |
| 73 DEFINE_INLINE_VIRTUAL_TRACE() { } | 73 DEFINE_INLINE_VIRTUAL_TRACE() { } |
| 74 | 74 |
| 75 virtual ~ConsoleBase(); | 75 virtual ~ConsoleBase(); |
| 76 | 76 |
| 77 protected: | 77 protected: |
| 78 virtual ExecutionContext* context() = 0; | 78 virtual ExecutionContext* context() = 0; |
| 79 virtual void reportMessageToConsole(PassRefPtrWillBeRawPtr<ConsoleMessage>)
= 0; | 79 virtual void reportMessageToConsole(RawPtr<ConsoleMessage>) = 0; |
| 80 | 80 |
| 81 private: | 81 private: |
| 82 void internalAddMessage(MessageType, MessageLevel, ScriptState*, PassRefPtrW
illBeRawPtr<ScriptArguments>, bool acceptNoArguments = false); | 82 void internalAddMessage(MessageType, MessageLevel, ScriptState*, RawPtr<Scri
ptArguments>, bool acceptNoArguments = false); |
| 83 | 83 |
| 84 HashCountedSet<String> m_counts; | 84 HashCountedSet<String> m_counts; |
| 85 HashMap<String, double> m_times; | 85 HashMap<String, double> m_times; |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 } // namespace blink | 88 } // namespace blink |
| 89 | 89 |
| 90 #endif // ConsoleBase_h | 90 #endif // ConsoleBase_h |
| OLD | NEW |