| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 23 */ | 23 */ |
| 24 | 24 |
| 25 #ifndef InspectorConsoleAgent_h | 25 #ifndef InspectorConsoleAgent_h |
| 26 #define InspectorConsoleAgent_h | 26 #define InspectorConsoleAgent_h |
| 27 | 27 |
| 28 #include "InspectorFrontend.h" | 28 #include "InspectorFrontend.h" |
| 29 #include "bindings/v8/ScriptState.h" | 29 #include "bindings/v8/ScriptState.h" |
| 30 #include "bindings/v8/ScriptString.h" | 30 #include "bindings/v8/ScriptString.h" |
| 31 #include "core/inspector/ConsoleAPITypes.h" | 31 #include "core/inspector/ConsoleAPITypes.h" |
| 32 #include "core/inspector/InspectorAgent.h" |
| 32 #include "core/inspector/InspectorBaseAgent.h" | 33 #include "core/inspector/InspectorBaseAgent.h" |
| 33 #include "core/page/ConsoleTypes.h" | 34 #include "core/page/ConsoleTypes.h" |
| 34 #include "wtf/Forward.h" | 35 #include "wtf/Forward.h" |
| 35 #include "wtf/HashMap.h" | 36 #include "wtf/HashMap.h" |
| 36 #include "wtf/Noncopyable.h" | 37 #include "wtf/Noncopyable.h" |
| 37 #include "wtf/Vector.h" | 38 #include "wtf/Vector.h" |
| 38 #include "wtf/text/StringHash.h" | 39 #include "wtf/text/StringHash.h" |
| 39 | 40 |
| 40 namespace WebCore { | 41 namespace WebCore { |
| 41 | 42 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 68 virtual void clearMessages(ErrorString*); | 69 virtual void clearMessages(ErrorString*); |
| 69 bool enabled() { return m_enabled; } | 70 bool enabled() { return m_enabled; } |
| 70 void reset(); | 71 void reset(); |
| 71 | 72 |
| 72 virtual void setFrontend(InspectorFrontend*); | 73 virtual void setFrontend(InspectorFrontend*); |
| 73 virtual void clearFrontend(); | 74 virtual void clearFrontend(); |
| 74 virtual void restore(); | 75 virtual void restore(); |
| 75 | 76 |
| 76 void addMessageToConsole(MessageSource, MessageType, MessageLevel, const Str
ing& message, ScriptState*, PassRefPtr<ScriptArguments>, unsigned long requestId
entifier = 0); | 77 void addMessageToConsole(MessageSource, MessageType, MessageLevel, const Str
ing& message, ScriptState*, PassRefPtr<ScriptArguments>, unsigned long requestId
entifier = 0); |
| 77 void addMessageToConsole(MessageSource, MessageType, MessageLevel, const Str
ing& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber
= 0, ScriptState* = 0, unsigned long requestIdentifier = 0); | 78 void addMessageToConsole(MessageSource, MessageType, MessageLevel, const Str
ing& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber
= 0, ScriptState* = 0, unsigned long requestIdentifier = 0); |
| 79 void addMessageToConsole(PassOwnPtr<ConsoleMessage>, InspectorAgent::CheckFr
ontendBehavior); |
| 78 | 80 |
| 79 // FIXME: Remove once we no longer generate stacks outside of Inspector. | 81 // FIXME: Remove once we no longer generate stacks outside of Inspector. |
| 80 void addMessageToConsole(MessageSource, MessageType, MessageLevel, const Str
ing& message, PassRefPtr<ScriptCallStack>, unsigned long requestIdentifier = 0); | 82 void addMessageToConsole(MessageSource, MessageType, MessageLevel, const Str
ing& message, PassRefPtr<ScriptCallStack>, unsigned long requestIdentifier = 0); |
| 81 | 83 |
| 82 Vector<unsigned> consoleMessageArgumentCounts(); | 84 Vector<unsigned> consoleMessageArgumentCounts(); |
| 83 | 85 |
| 84 void startConsoleTiming(Frame*, const String& title); | 86 void startConsoleTiming(Frame*, const String& title); |
| 85 void stopConsoleTiming(Frame*, const String& title, PassRefPtr<ScriptCallSta
ck>); | 87 void stopConsoleTiming(Frame*, const String& title, PassRefPtr<ScriptCallSta
ck>); |
| 86 void consoleCount(ScriptState*, PassRefPtr<ScriptArguments>); | 88 void consoleCount(ScriptState*, PassRefPtr<ScriptArguments>); |
| 87 | 89 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 111 HashMap<String, double> m_times; | 113 HashMap<String, double> m_times; |
| 112 bool m_enabled; | 114 bool m_enabled; |
| 113 private: | 115 private: |
| 114 static int s_enabledAgentCount; | 116 static int s_enabledAgentCount; |
| 115 }; | 117 }; |
| 116 | 118 |
| 117 } // namespace WebCore | 119 } // namespace WebCore |
| 118 | 120 |
| 119 | 121 |
| 120 #endif // !defined(InspectorConsoleAgent_h) | 122 #endif // !defined(InspectorConsoleAgent_h) |
| OLD | NEW |