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

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

Issue 376213002: DevTools: Make FrameConsole methods accept ConsoleMessage objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@scriptFailedToParse
Patch Set: Created 6 years, 4 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: Source/core/inspector/ConsoleMessage.h
diff --git a/Source/core/inspector/ConsoleMessage.h b/Source/core/inspector/ConsoleMessage.h
new file mode 100644
index 0000000000000000000000000000000000000000..fd6e36ae0c40b6d633908232751d576ab1d1c9f0
--- /dev/null
+++ b/Source/core/inspector/ConsoleMessage.h
@@ -0,0 +1,62 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ConsoleMessage_h
+#define ConsoleMessage_h
+
+#include "bindings/core/v8/ScriptState.h"
+#include "core/frame/ConsoleTypes.h"
+#include "core/inspector/ScriptCallStack.h"
+#include "wtf/Forward.h"
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefCounted.h"
+#include "wtf/text/WTFString.h"
+
+namespace blink {
+
+class ScriptCallStack;
+class ScriptState;
+
+class ConsoleMessage FINAL: public RefCounted<ConsoleMessage> {
+public:
+ static PassRefPtr<ConsoleMessage> create(MessageSource source, MessageLevel level, const String& message, const String& url = String(), unsigned lineNumber = 0, unsigned columnNumber = 0)
+ {
+ return adoptRef(new ConsoleMessage(source, level, message, url, lineNumber, columnNumber));
+ }
+
+ void setCallStack(PassRefPtr<ScriptCallStack>);
+ void setScriptState(PassRefPtr<ScriptState>);
+ void setRequestIdentifier(unsigned long);
+
+ void setURL(const String&);
+ void setLineNumber(unsigned);
+
+ MessageSource source() const;
+ MessageLevel level() const;
+ const String& message() const;
+ const String& url() const;
+ unsigned lineNumber() const;
+ unsigned columnNumber() const;
+ PassRefPtr<ScriptCallStack> callStack() const;
+ PassRefPtr<ScriptState> scriptState() const;
aandrey 2014/08/05 07:35:44 return ScriptState* (check code search)
kozyatinskiy1 2014/08/08 13:10:26 Done.
+ unsigned long requestIdentifier() const;
+
+private:
+ ConsoleMessage();
+ ConsoleMessage(MessageSource, MessageLevel, const String& message, const String& url = String(), unsigned lineNumber = 0, unsigned columnNumber = 0);
+
+ MessageSource m_source;
+ MessageLevel m_level;
+ String m_message;
+ String m_url;
+ unsigned m_lineNumber;
+ unsigned m_columnNumber;
+ RefPtr<ScriptCallStack> m_callStack;
+ RefPtr<ScriptState> m_scriptState;
+ unsigned long m_requestIdentifier;
+};
+
+} // namespace WebCore
+
+#endif // ConsoleMessage_h

Powered by Google App Engine
This is Rietveld 408576698