| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 V8ConsoleMessage_h | 5 #ifndef V8ConsoleMessage_h |
| 6 #define V8ConsoleMessage_h | 6 #define V8ConsoleMessage_h |
| 7 | 7 |
| 8 #include "platform/inspector_protocol/Collections.h" | 8 #include "platform/inspector_protocol/Collections.h" |
| 9 #include "platform/inspector_protocol/String16.h" | 9 #include "platform/inspector_protocol/String16.h" |
| 10 #include "platform/v8_inspector/protocol/Console.h" | 10 #include "platform/v8_inspector/protocol/Console.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 static std::unique_ptr<V8ConsoleMessage> createForConsoleAPI( | 31 static std::unique_ptr<V8ConsoleMessage> createForConsoleAPI( |
| 32 double timestamp, | 32 double timestamp, |
| 33 ConsoleAPIType, | 33 ConsoleAPIType, |
| 34 const std::vector<v8::Local<v8::Value>>& arguments, | 34 const std::vector<v8::Local<v8::Value>>& arguments, |
| 35 std::unique_ptr<V8StackTraceImpl>, | 35 std::unique_ptr<V8StackTraceImpl>, |
| 36 InspectedContext*); | 36 InspectedContext*); |
| 37 | 37 |
| 38 static std::unique_ptr<V8ConsoleMessage> createForException( | 38 static std::unique_ptr<V8ConsoleMessage> createForException( |
| 39 double timestamp, | 39 double timestamp, |
| 40 const String16& message, | 40 const String16& detailedMessage, |
| 41 const String16& url, | 41 const String16& url, |
| 42 unsigned lineNumber, | 42 unsigned lineNumber, |
| 43 unsigned columnNumber, | 43 unsigned columnNumber, |
| 44 std::unique_ptr<V8StackTraceImpl>, | 44 std::unique_ptr<V8StackTraceImpl>, |
| 45 int scriptId, | 45 int scriptId, |
| 46 v8::Isolate*, | 46 v8::Isolate*, |
| 47 const String16& message, |
| 47 int contextId, | 48 int contextId, |
| 48 v8::Local<v8::Value> exception, | 49 v8::Local<v8::Value> exception, |
| 49 unsigned exceptionId); | 50 unsigned exceptionId); |
| 50 | 51 |
| 51 static std::unique_ptr<V8ConsoleMessage> createForRevokedException( | 52 static std::unique_ptr<V8ConsoleMessage> createForRevokedException( |
| 52 double timestamp, | 53 double timestamp, |
| 53 const String16& message, | 54 const String16& message, |
| 54 unsigned revokedExceptionId); | 55 unsigned revokedExceptionId); |
| 55 | 56 |
| 56 V8MessageOrigin origin() const; | 57 V8MessageOrigin origin() const; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 73 String16 m_url; | 74 String16 m_url; |
| 74 unsigned m_lineNumber; | 75 unsigned m_lineNumber; |
| 75 unsigned m_columnNumber; | 76 unsigned m_columnNumber; |
| 76 std::unique_ptr<V8StackTraceImpl> m_stackTrace; | 77 std::unique_ptr<V8StackTraceImpl> m_stackTrace; |
| 77 int m_scriptId; | 78 int m_scriptId; |
| 78 int m_contextId; | 79 int m_contextId; |
| 79 ConsoleAPIType m_type; | 80 ConsoleAPIType m_type; |
| 80 unsigned m_exceptionId; | 81 unsigned m_exceptionId; |
| 81 unsigned m_revokedExceptionId; | 82 unsigned m_revokedExceptionId; |
| 82 Arguments m_arguments; | 83 Arguments m_arguments; |
| 84 String16 m_detailedMessage; |
| 83 }; | 85 }; |
| 84 | 86 |
| 85 class V8ConsoleMessageStorage { | 87 class V8ConsoleMessageStorage { |
| 86 public: | 88 public: |
| 87 V8ConsoleMessageStorage(V8DebuggerImpl*, int contextGroupId); | 89 V8ConsoleMessageStorage(V8DebuggerImpl*, int contextGroupId); |
| 88 ~V8ConsoleMessageStorage(); | 90 ~V8ConsoleMessageStorage(); |
| 89 | 91 |
| 90 int contextGroupId() { return m_contextGroupId; } | 92 int contextGroupId() { return m_contextGroupId; } |
| 91 int expiredCount() { return m_expiredCount; } | 93 int expiredCount() { return m_expiredCount; } |
| 92 const std::deque<std::unique_ptr<V8ConsoleMessage>>& messages() const { retu
rn m_messages; } | 94 const std::deque<std::unique_ptr<V8ConsoleMessage>>& messages() const { retu
rn m_messages; } |
| 93 | 95 |
| 94 void addMessage(std::unique_ptr<V8ConsoleMessage>); | 96 void addMessage(std::unique_ptr<V8ConsoleMessage>); |
| 95 void contextDestroyed(int contextId); | 97 void contextDestroyed(int contextId); |
| 96 void clear(); | 98 void clear(); |
| 97 | 99 |
| 98 private: | 100 private: |
| 99 void notifyClear(); | 101 void notifyClear(); |
| 100 | 102 |
| 101 V8DebuggerImpl* m_debugger; | 103 V8DebuggerImpl* m_debugger; |
| 102 int m_contextGroupId; | 104 int m_contextGroupId; |
| 103 int m_expiredCount; | 105 int m_expiredCount; |
| 104 std::deque<std::unique_ptr<V8ConsoleMessage>> m_messages; | 106 std::deque<std::unique_ptr<V8ConsoleMessage>> m_messages; |
| 105 }; | 107 }; |
| 106 | 108 |
| 107 } // namespace blink | 109 } // namespace blink |
| 108 | 110 |
| 109 #endif // V8ConsoleMessage_h | 111 #endif // V8ConsoleMessage_h |
| OLD | NEW |