Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(454)

Side by Side Diff: sky/engine/core/inspector/ConsoleMessage.h

Issue 922893002: Merge the Sky Engine changes from the SkyDart branch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 SKY_ENGINE_CORE_INSPECTOR_CONSOLEMESSAGE_H_ 5 #ifndef SKY_ENGINE_CORE_INSPECTOR_CONSOLEMESSAGE_H_
6 #define SKY_ENGINE_CORE_INSPECTOR_CONSOLEMESSAGE_H_ 6 #define SKY_ENGINE_CORE_INSPECTOR_CONSOLEMESSAGE_H_
7 7
8 #include "sky/engine/bindings/core/v8/ScriptState.h"
9 #include "sky/engine/core/frame/ConsoleTypes.h" 8 #include "sky/engine/core/frame/ConsoleTypes.h"
10 #include "sky/engine/core/inspector/ConsoleAPITypes.h" 9 #include "sky/engine/core/inspector/ConsoleAPITypes.h"
11 #include "sky/engine/core/inspector/ScriptCallStack.h" 10 #include "sky/engine/core/inspector/ScriptCallStack.h"
12 #include "sky/engine/platform/heap/Handle.h" 11 #include "sky/engine/platform/heap/Handle.h"
13 #include "sky/engine/wtf/Forward.h" 12 #include "sky/engine/wtf/Forward.h"
14 #include "sky/engine/wtf/PassRefPtr.h" 13 #include "sky/engine/wtf/PassRefPtr.h"
15 #include "sky/engine/wtf/RefCounted.h" 14 #include "sky/engine/wtf/RefCounted.h"
16 #include "sky/engine/wtf/text/WTFString.h" 15 #include "sky/engine/wtf/text/WTFString.h"
17 16
18 namespace blink { 17 namespace blink {
19 18
20 class ScriptArguments;
21 class ScriptCallStack;
22 class ScriptState;
23
24 class ConsoleMessage final: public RefCounted<ConsoleMessage> { 19 class ConsoleMessage final: public RefCounted<ConsoleMessage> {
25 public: 20 public:
26 static PassRefPtr<ConsoleMessage> create(MessageSource source, MessageLevel level, const String& message, const String& url = String(), unsigned lineNumber = 0, unsigned columnNumber = 0) 21 static PassRefPtr<ConsoleMessage> create(MessageSource source, MessageLevel level, const String& message, const String& url = String(), unsigned lineNumber = 0, unsigned columnNumber = 0)
27 { 22 {
28 return adoptRef(new ConsoleMessage(source, level, message, url, lineNumb er, columnNumber)); 23 return adoptRef(new ConsoleMessage(source, level, message, url, lineNumb er, columnNumber));
29 } 24 }
30 ~ConsoleMessage(); 25 ~ConsoleMessage();
31 26
32 MessageType type() const; 27 MessageType type() const;
33 void setType(MessageType); 28 void setType(MessageType);
34 int scriptId() const; 29 int scriptId() const;
35 void setScriptId(int); 30 void setScriptId(int);
36 const String& url() const; 31 const String& url() const;
37 void setURL(const String&); 32 void setURL(const String&);
38 unsigned lineNumber() const; 33 unsigned lineNumber() const;
39 void setLineNumber(unsigned); 34 void setLineNumber(unsigned);
40 PassRefPtr<ScriptCallStack> callStack() const;
41 void setCallStack(PassRefPtr<ScriptCallStack>);
42 ScriptState* scriptState() const;
43 void setScriptState(ScriptState*);
44 PassRefPtr<ScriptArguments> scriptArguments() const;
45 void setScriptArguments(PassRefPtr<ScriptArguments>);
46 unsigned long requestIdentifier() const; 35 unsigned long requestIdentifier() const;
47 void setRequestIdentifier(unsigned long); 36 void setRequestIdentifier(unsigned long);
48 double timestamp() const; 37 double timestamp() const;
49 void setTimestamp(double); 38 void setTimestamp(double);
50 39
51 MessageSource source() const; 40 MessageSource source() const;
52 MessageLevel level() const; 41 MessageLevel level() const;
53 const String& message() const; 42 const String& message() const;
54 unsigned columnNumber() const; 43 unsigned columnNumber() const;
55 44
56 void frameWindowDiscarded(LocalDOMWindow*);
57 unsigned argumentCount();
58
59 void collectCallStack();
60
61 private: 45 private:
62 ConsoleMessage(MessageSource, MessageLevel, const String& message, const Str ing& url = String(), unsigned lineNumber = 0, unsigned columnNumber = 0); 46 ConsoleMessage(MessageSource, MessageLevel, const String& message, const Str ing& url = String(), unsigned lineNumber = 0, unsigned columnNumber = 0);
63 47
64 MessageSource m_source; 48 MessageSource m_source;
65 MessageLevel m_level; 49 MessageLevel m_level;
66 MessageType m_type; 50 MessageType m_type;
67 String m_message; 51 String m_message;
68 int m_scriptId; 52 int m_scriptId;
69 String m_url; 53 String m_url;
70 unsigned m_lineNumber; 54 unsigned m_lineNumber;
71 unsigned m_columnNumber; 55 unsigned m_columnNumber;
72 RefPtr<ScriptCallStack> m_callStack;
73 OwnPtr<ScriptStateProtectingContext> m_scriptState;
74 RefPtr<ScriptArguments> m_scriptArguments;
75 unsigned long m_requestIdentifier; 56 unsigned long m_requestIdentifier;
76 double m_timestamp; 57 double m_timestamp;
77 }; 58 };
78 59
79 } // namespace blink 60 } // namespace blink
80 61
81 #endif // SKY_ENGINE_CORE_INSPECTOR_CONSOLEMESSAGE_H_ 62 #endif // SKY_ENGINE_CORE_INSPECTOR_CONSOLEMESSAGE_H_
OLDNEW
« no previous file with comments | « sky/engine/core/html/parser/HTMLTreeBuilder.cpp ('k') | sky/engine/core/inspector/ConsoleMessage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698