OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> | 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> |
4 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. | 4 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * | 9 * |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 class InspectorFrontend; | 44 class InspectorFrontend; |
45 class ScriptArguments; | 45 class ScriptArguments; |
46 class ScriptCallFrame; | 46 class ScriptCallFrame; |
47 class ScriptCallStack; | 47 class ScriptCallStack; |
48 class ScriptValue; | 48 class ScriptValue; |
49 | 49 |
50 class ConsoleMessage { | 50 class ConsoleMessage { |
51 WTF_MAKE_NONCOPYABLE(ConsoleMessage); WTF_MAKE_FAST_ALLOCATED; | 51 WTF_MAKE_NONCOPYABLE(ConsoleMessage); WTF_MAKE_FAST_ALLOCATED; |
52 public: | 52 public: |
53 ConsoleMessage(bool canGenerateCallStack, MessageSource, MessageType, Messag
eLevel, const String& message); | 53 ConsoleMessage(bool canGenerateCallStack, MessageSource, MessageType, Messag
eLevel, const String& message); |
54 ConsoleMessage(bool canGenerateCallStack, MessageSource, MessageType, Messag
eLevel, const String& message, const String& url, unsigned line, unsigned column
, ScriptState*, unsigned long requestIdentifier); | 54 ConsoleMessage(bool canGenerateCallStack, MessageSource, MessageType, Messag
eLevel, const String& message, const String& executionContextURL, const String&
url, unsigned line, unsigned column, ScriptState*, unsigned long requestIdentifi
er); |
55 ConsoleMessage(bool canGenerateCallStack, MessageSource, MessageType, Messag
eLevel, const String& message, PassRefPtr<ScriptCallStack>, unsigned long reques
tIdentifier); | 55 ConsoleMessage(bool canGenerateCallStack, MessageSource, MessageType, Messag
eLevel, const String& message, const String& executionContextURL, PassRefPtr<Scr
iptCallStack>, unsigned long requestIdentifier); |
56 ConsoleMessage(bool canGenerateCallStack, MessageSource, MessageType, Messag
eLevel, const String& message, PassRefPtr<ScriptArguments>, ScriptState*, unsign
ed long requestIdentifier); | 56 ConsoleMessage(bool canGenerateCallStack, MessageSource, MessageType, Messag
eLevel, const String& message, const String& executionContextURL, PassRefPtr<Scr
iptArguments>, ScriptState*, unsigned long requestIdentifier); |
57 ~ConsoleMessage(); | 57 ~ConsoleMessage(); |
58 | 58 |
59 void addToFrontend(InspectorFrontend::Console*, InjectedScriptManager*, bool
generatePreview); | 59 void addToFrontend(InspectorFrontend::Console*, InjectedScriptManager*, bool
generatePreview); |
60 void updateRepeatCountInConsole(InspectorFrontend::Console*); | 60 void updateRepeatCountInConsole(InspectorFrontend::Console*); |
61 void incrementCount(); | 61 void incrementCount(); |
62 void setTimestamp(double timestamp) { m_timestamp = timestamp; } | 62 void setTimestamp(double timestamp) { m_timestamp = timestamp; } |
63 bool isEqual(ConsoleMessage* msg) const; | 63 bool isEqual(ConsoleMessage* msg) const; |
| 64 bool hasGeneratedCallStack() const; |
| 65 void generateCallStack(size_t maxSizeToCapture); |
| 66 PassRefPtr<TypeBuilder::Console::ConsoleMessage> generateJSONWithoutArgument
s() const; |
64 | 67 |
65 MessageSource source() const { return m_source; } | 68 MessageSource source() const { return m_source; } |
66 const String& message() const { return m_message; } | 69 const String& message() const { return m_message; } |
67 MessageType type() const { return m_type; } | 70 MessageType type() const { return m_type; } |
68 | 71 |
69 void windowCleared(DOMWindow*); | 72 void windowCleared(DOMWindow*); |
70 | 73 |
71 unsigned argumentCount(); | 74 unsigned argumentCount(); |
72 | 75 |
73 private: | 76 private: |
74 void autogenerateMetadata(bool canGenerateCallStack, ScriptState* = 0); | 77 void autogenerateMetadata(bool canGenerateCallStack, ScriptState* = 0); |
75 | 78 |
76 MessageSource m_source; | 79 MessageSource m_source; |
77 MessageType m_type; | 80 MessageType m_type; |
78 MessageLevel m_level; | 81 MessageLevel m_level; |
79 String m_message; | 82 String m_message; |
80 RefPtr<ScriptArguments> m_arguments; | 83 RefPtr<ScriptArguments> m_arguments; |
81 RefPtr<ScriptCallStack> m_callStack; | 84 RefPtr<ScriptCallStack> m_callStack; |
| 85 String m_executionContextURL; |
82 String m_url; | 86 String m_url; |
83 unsigned m_line; | 87 unsigned m_line; |
84 unsigned m_column; | 88 unsigned m_column; |
85 unsigned m_repeatCount; | 89 unsigned m_repeatCount; |
86 String m_requestId; | 90 String m_requestId; |
87 double m_timestamp; | 91 double m_timestamp; |
88 }; | 92 }; |
89 | 93 |
90 } // namespace WebCore | 94 } // namespace WebCore |
91 | 95 |
92 #endif // ConsoleMessage_h | 96 #endif // ConsoleMessage_h |
OLD | NEW |