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

Side by Side Diff: third_party/WebKit/Source/core/inspector/ConsoleMessage.h

Issue 2004313003: DevTools: migrate from OwnPtr to std::unique_ptr for inspector protocol classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaselined Created 4 years, 6 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 ConsoleMessage_h 5 #ifndef ConsoleMessage_h
6 #define ConsoleMessage_h 6 #define ConsoleMessage_h
7 7
8 #include "bindings/core/v8/ScriptState.h" 8 #include "bindings/core/v8/ScriptState.h"
9 #include "core/CoreExport.h" 9 #include "core/CoreExport.h"
10 #include "platform/heap/Handle.h" 10 #include "platform/heap/Handle.h"
(...skipping 26 matching lines...) Expand all
37 // Shortcut when location is unavailable. This method captures callstack. 37 // Shortcut when location is unavailable. This method captures callstack.
38 static ConsoleMessage* create(MessageSource, MessageLevel, const String& mes sage); 38 static ConsoleMessage* create(MessageSource, MessageLevel, const String& mes sage);
39 39
40 // This method captures callstack. 40 // This method captures callstack.
41 static ConsoleMessage* createForRequest(MessageSource, MessageLevel, const S tring& message, const String& url, unsigned long requestIdentifier); 41 static ConsoleMessage* createForRequest(MessageSource, MessageLevel, const S tring& message, const String& url, unsigned long requestIdentifier);
42 42
43 // This method captures callstack. 43 // This method captures callstack.
44 static ConsoleMessage* createForConsoleAPI(MessageLevel, MessageType, const String& message, ScriptArguments*); 44 static ConsoleMessage* createForConsoleAPI(MessageLevel, MessageType, const String& message, ScriptArguments*);
45 45
46 static ConsoleMessage* create(MessageSource, MessageLevel, const String& mes sage, PassOwnPtr<SourceLocation>); 46 static ConsoleMessage* create(MessageSource, MessageLevel, const String& mes sage, PassOwnPtr<SourceLocation>);
47 static ConsoleMessage* create(MessageSource, MessageLevel, const String& mes sage, const String& url, unsigned lineNumber, unsigned columnNumber, PassOwnPtr< V8StackTrace>, int scriptId, ScriptArguments*); 47 static ConsoleMessage* create(MessageSource, MessageLevel, const String& mes sage, const String& url, unsigned lineNumber, unsigned columnNumber, std::unique _ptr<V8StackTrace>, int scriptId, ScriptArguments*);
48 48
49 ~ConsoleMessage(); 49 ~ConsoleMessage();
50 50
51 MessageType type() const; 51 MessageType type() const;
52 int scriptId() const; 52 int scriptId() const;
53 const String& url() const; 53 const String& url() const;
54 unsigned lineNumber() const; 54 unsigned lineNumber() const;
55 unsigned columnNumber() const; 55 unsigned columnNumber() const;
56 V8StackTrace* stackTrace() const; 56 V8StackTrace* stackTrace() const;
57 ScriptArguments* scriptArguments() const; 57 ScriptArguments* scriptArguments() const;
58 unsigned long requestIdentifier() const; 58 unsigned long requestIdentifier() const;
59 double timestamp() const; 59 double timestamp() const;
60 unsigned assignMessageId(); 60 unsigned assignMessageId();
61 unsigned messageId() const { return m_messageId; } 61 unsigned messageId() const { return m_messageId; }
62 unsigned relatedMessageId() const { return m_relatedMessageId; } 62 unsigned relatedMessageId() const { return m_relatedMessageId; }
63 void setRelatedMessageId(unsigned relatedMessageId) { m_relatedMessageId = r elatedMessageId; } 63 void setRelatedMessageId(unsigned relatedMessageId) { m_relatedMessageId = r elatedMessageId; }
64 MessageSource source() const; 64 MessageSource source() const;
65 MessageLevel level() const; 65 MessageLevel level() const;
66 const String& message() const; 66 const String& message() const;
67 67
68 void frameWindowDiscarded(LocalDOMWindow*); 68 void frameWindowDiscarded(LocalDOMWindow*);
69 unsigned argumentCount(); 69 unsigned argumentCount();
70 70
71 DECLARE_TRACE(); 71 DECLARE_TRACE();
72 72
73 private: 73 private:
74 ConsoleMessage(MessageSource, MessageLevel, const String& message, const Str ing& url, unsigned lineNumber, unsigned columnNumber, PassOwnPtr<V8StackTrace>, int scriptId, ScriptArguments*); 74 ConsoleMessage(MessageSource, MessageLevel, const String& message, const Str ing& url, unsigned lineNumber, unsigned columnNumber, std::unique_ptr<V8StackTra ce>, int scriptId, ScriptArguments*);
75 75
76 MessageSource m_source; 76 MessageSource m_source;
77 MessageLevel m_level; 77 MessageLevel m_level;
78 MessageType m_type; 78 MessageType m_type;
79 String m_message; 79 String m_message;
80 int m_scriptId; 80 int m_scriptId;
81 String m_url; 81 String m_url;
82 unsigned m_lineNumber; 82 unsigned m_lineNumber;
83 unsigned m_columnNumber; 83 unsigned m_columnNumber;
84 OwnPtr<V8StackTrace> m_stackTrace; 84 std::unique_ptr<V8StackTrace> m_stackTrace;
85 Member<ScriptArguments> m_scriptArguments; 85 Member<ScriptArguments> m_scriptArguments;
86 unsigned long m_requestIdentifier; 86 unsigned long m_requestIdentifier;
87 double m_timestamp; 87 double m_timestamp;
88 unsigned m_messageId; 88 unsigned m_messageId;
89 unsigned m_relatedMessageId; 89 unsigned m_relatedMessageId;
90 }; 90 };
91 91
92 } // namespace blink 92 } // namespace blink
93 93
94 #endif // ConsoleMessage_h 94 #endif // ConsoleMessage_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698