| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ConsoleMessage_h | 5 #ifndef ConsoleMessage_h |
| 6 #define ConsoleMessage_h | 6 #define ConsoleMessage_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptCallStack.h" | 8 #include "bindings/core/v8/ScriptCallStack.h" |
| 9 #include "bindings/core/v8/ScriptState.h" | 9 #include "bindings/core/v8/ScriptState.h" |
| 10 #include "core/CoreExport.h" | 10 #include "core/CoreExport.h" |
| 11 #include "platform/heap/Handle.h" | 11 #include "platform/heap/Handle.h" |
| 12 #include "platform/v8_inspector/public/ConsoleAPITypes.h" | 12 #include "platform/v8_inspector/public/ConsoleAPITypes.h" |
| 13 #include "platform/v8_inspector/public/ConsoleTypes.h" | 13 #include "platform/v8_inspector/public/ConsoleTypes.h" |
| 14 #include "wtf/Forward.h" | 14 #include "wtf/Forward.h" |
| 15 #include "wtf/PassRefPtr.h" | 15 #include "wtf/PassRefPtr.h" |
| 16 #include "wtf/RefCounted.h" | 16 #include "wtf/RefCounted.h" |
| 17 #include "wtf/text/WTFString.h" | 17 #include "wtf/text/WTFString.h" |
| 18 | 18 |
| 19 namespace blink { | 19 namespace blink { |
| 20 | 20 |
| 21 class ScriptArguments; | 21 class ScriptArguments; |
| 22 class ScriptState; | 22 class ScriptState; |
| 23 class WorkerInspectorProxy; | |
| 24 | 23 |
| 25 class CORE_EXPORT ConsoleMessage final: public GarbageCollectedFinalized<Console
Message> { | 24 class CORE_EXPORT ConsoleMessage final: public GarbageCollectedFinalized<Console
Message> { |
| 26 public: | 25 public: |
| 27 // Callstack may be empty. Zero lineNumber or columnNumber means unknown. | 26 // Callstack may be empty. Zero lineNumber or columnNumber means unknown. |
| 28 static ConsoleMessage* create(MessageSource, MessageLevel, const String& mes
sage, const String& url, unsigned lineNumber, unsigned columnNumber, PassRefPtr<
ScriptCallStack>, int scriptId = 0); | 27 static ConsoleMessage* create(MessageSource, MessageLevel, const String& mes
sage, const String& url, unsigned lineNumber, unsigned columnNumber, PassRefPtr<
ScriptCallStack>, int scriptId = 0); |
| 29 | 28 |
| 30 // Shortcut when callstack is unavailable. | 29 // Shortcut when callstack is unavailable. |
| 31 static ConsoleMessage* create(MessageSource, MessageLevel, const String& mes
sage, const String& url, unsigned lineNumber, unsigned columnNumber); | 30 static ConsoleMessage* create(MessageSource, MessageLevel, const String& mes
sage, const String& url, unsigned lineNumber, unsigned columnNumber); |
| 32 | 31 |
| 33 // This method tries to capture callstack if possible and falls back to prov
ided location. | 32 // This method tries to capture callstack if possible and falls back to prov
ided location. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 49 void setColumnNumber(unsigned); | 48 void setColumnNumber(unsigned); |
| 50 PassRefPtr<ScriptCallStack> callStack() const; | 49 PassRefPtr<ScriptCallStack> callStack() const; |
| 51 ScriptState* getScriptState() const; | 50 ScriptState* getScriptState() const; |
| 52 void setScriptState(ScriptState*); | 51 void setScriptState(ScriptState*); |
| 53 ScriptArguments* scriptArguments() const; | 52 ScriptArguments* scriptArguments() const; |
| 54 void setScriptArguments(ScriptArguments*); | 53 void setScriptArguments(ScriptArguments*); |
| 55 unsigned long requestIdentifier() const; | 54 unsigned long requestIdentifier() const; |
| 56 void setRequestIdentifier(unsigned long); | 55 void setRequestIdentifier(unsigned long); |
| 57 double timestamp() const; | 56 double timestamp() const; |
| 58 void setTimestamp(double); | 57 void setTimestamp(double); |
| 59 WorkerInspectorProxy* workerInspectorProxy() { return m_workerProxy; } | |
| 60 void setWorkerInspectorProxy(WorkerInspectorProxy* proxy) { m_workerProxy =
proxy; } | |
| 61 unsigned assignMessageId(); | 58 unsigned assignMessageId(); |
| 62 unsigned messageId() const { return m_messageId; } | 59 unsigned messageId() const { return m_messageId; } |
| 63 unsigned relatedMessageId() const { return m_relatedMessageId; } | 60 unsigned relatedMessageId() const { return m_relatedMessageId; } |
| 64 void setRelatedMessageId(unsigned relatedMessageId) { m_relatedMessageId = r
elatedMessageId; } | 61 void setRelatedMessageId(unsigned relatedMessageId) { m_relatedMessageId = r
elatedMessageId; } |
| 65 | 62 |
| 66 MessageSource source() const; | 63 MessageSource source() const; |
| 67 MessageLevel level() const; | 64 MessageLevel level() const; |
| 68 const String& message() const; | 65 const String& message() const; |
| 69 | 66 |
| 70 void frameWindowDiscarded(LocalDOMWindow*); | 67 void frameWindowDiscarded(LocalDOMWindow*); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 81 String m_message; | 78 String m_message; |
| 82 int m_scriptId; | 79 int m_scriptId; |
| 83 String m_url; | 80 String m_url; |
| 84 unsigned m_lineNumber; | 81 unsigned m_lineNumber; |
| 85 unsigned m_columnNumber; | 82 unsigned m_columnNumber; |
| 86 RefPtr<ScriptCallStack> m_callStack; | 83 RefPtr<ScriptCallStack> m_callStack; |
| 87 OwnPtr<ScriptStateProtectingContext> m_scriptState; | 84 OwnPtr<ScriptStateProtectingContext> m_scriptState; |
| 88 Member<ScriptArguments> m_scriptArguments; | 85 Member<ScriptArguments> m_scriptArguments; |
| 89 unsigned long m_requestIdentifier; | 86 unsigned long m_requestIdentifier; |
| 90 double m_timestamp; | 87 double m_timestamp; |
| 91 Member<WorkerInspectorProxy> m_workerProxy; | |
| 92 unsigned m_messageId; | 88 unsigned m_messageId; |
| 93 unsigned m_relatedMessageId; | 89 unsigned m_relatedMessageId; |
| 94 }; | 90 }; |
| 95 | 91 |
| 96 } // namespace blink | 92 } // namespace blink |
| 97 | 93 |
| 98 #endif // ConsoleMessage_h | 94 #endif // ConsoleMessage_h |
| OLD | NEW |