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

Unified Diff: third_party/WebKit/Source/core/inspector/ConsoleMessage.h

Issue 1998353003: Reduce ConsoleMessage API surface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@1999463002
Patch Set: rebased Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/inspector/ConsoleMessage.h
diff --git a/third_party/WebKit/Source/core/inspector/ConsoleMessage.h b/third_party/WebKit/Source/core/inspector/ConsoleMessage.h
index eaf7a2ea5c990fe535b24e0f1c9b0f64500e8912..6cde6200dd10876c67c68e150a851270eca7f9c3 100644
--- a/third_party/WebKit/Source/core/inspector/ConsoleMessage.h
+++ b/third_party/WebKit/Source/core/inspector/ConsoleMessage.h
@@ -24,7 +24,7 @@ class ScriptState;
class CORE_EXPORT ConsoleMessage final: public GarbageCollectedFinalized<ConsoleMessage> {
public:
// Callstack may be empty. Zero lineNumber or columnNumber means unknown.
- static ConsoleMessage* create(MessageSource, MessageLevel, const String& message, const String& url, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack>, int scriptId = 0);
+ static ConsoleMessage* create(MessageSource, MessageLevel, const String& message, const String& url, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack>, int scriptId = 0, ScriptArguments* = nullptr);
// Shortcut when callstack is unavailable.
static ConsoleMessage* create(MessageSource, MessageLevel, const String& message, const String& url, unsigned lineNumber, unsigned columnNumber);
@@ -35,31 +35,27 @@ public:
// Shortcut when location is unavailable. This method captures callstack.
static ConsoleMessage* create(MessageSource, MessageLevel, const String& message);
+ // This method captures callstack.
+ static ConsoleMessage* createForRequest(MessageSource, MessageLevel, const String& message, const String& url, unsigned long requestIdentifier);
+
+ // This method captures callstack.
+ static ConsoleMessage* createForConsoleAPI(MessageLevel, MessageType, const String& message, ScriptArguments*);
+
~ConsoleMessage();
MessageType type() const;
- void setType(MessageType);
int scriptId() const;
const String& url() const;
- void setURL(const String&);
unsigned lineNumber() const;
- void setLineNumber(unsigned);
unsigned columnNumber() const;
- void setColumnNumber(unsigned);
PassRefPtr<ScriptCallStack> callStack() const;
- ScriptState* getScriptState() const;
- void setScriptState(ScriptState*);
ScriptArguments* scriptArguments() const;
- void setScriptArguments(ScriptArguments*);
unsigned long requestIdentifier() const;
- void setRequestIdentifier(unsigned long);
double timestamp() const;
- void setTimestamp(double);
unsigned assignMessageId();
unsigned messageId() const { return m_messageId; }
unsigned relatedMessageId() const { return m_relatedMessageId; }
void setRelatedMessageId(unsigned relatedMessageId) { m_relatedMessageId = relatedMessageId; }
-
MessageSource source() const;
MessageLevel level() const;
const String& message() const;
@@ -70,7 +66,7 @@ public:
DECLARE_TRACE();
private:
- ConsoleMessage(MessageSource, MessageLevel, const String& message, const String& url, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack>, int scriptId);
+ ConsoleMessage(MessageSource, MessageLevel, const String& message, const String& url, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack>, int scriptId, ScriptArguments*);
MessageSource m_source;
MessageLevel m_level;
@@ -81,7 +77,6 @@ private:
unsigned m_lineNumber;
unsigned m_columnNumber;
RefPtr<ScriptCallStack> m_callStack;
- OwnPtr<ScriptStateProtectingContext> m_scriptState;
Member<ScriptArguments> m_scriptArguments;
unsigned long m_requestIdentifier;
double m_timestamp;

Powered by Google App Engine
This is Rietveld 408576698