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

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/V8ConsoleAgentImpl.h

Issue 2035653006: [DevTools] Move Console to v8 inspector. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: improved api a bit 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/v8_inspector/V8ConsoleAgentImpl.h
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8ConsoleAgentImpl.h b/third_party/WebKit/Source/platform/v8_inspector/V8ConsoleAgentImpl.h
new file mode 100644
index 0000000000000000000000000000000000000000..bc897ac352e289e7f0e799cebb99d0027929d09d
--- /dev/null
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8ConsoleAgentImpl.h
@@ -0,0 +1,45 @@
+// Copyright 2016 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 V8ConsoleAgentImpl_h
+#define V8ConsoleAgentImpl_h
+
+#include "platform/inspector_protocol/Allocator.h"
+#include "platform/inspector_protocol/String16.h"
+#include "platform/v8_inspector/protocol/Console.h"
+
+namespace blink {
+
+class V8ConsoleMessage;
+class V8InspectorSessionImpl;
+
+class V8ConsoleAgentImpl : public protocol::Console::Backend {
+ PROTOCOL_DISALLOW_COPY(V8ConsoleAgentImpl);
+public:
+ V8ConsoleAgentImpl(V8InspectorSessionImpl*, protocol::FrontendChannel*, protocol::DictionaryValue* state);
+ ~V8ConsoleAgentImpl() override;
+
+ void enable(ErrorString*) override;
+ void disable(ErrorString*) override;
+ void clearMessages(ErrorString*) override;
+
+ void restore();
+ void messageAdded(V8ConsoleMessage*);
+ void reset();
+ bool enabled();
+
+private:
+ void reportAllMessages();
+ void reportMessage(V8ConsoleMessage*, bool generatePreview);
+
+ V8InspectorSessionImpl* m_session;
+ protocol::DictionaryValue* m_state;
+ protocol::Console::Frontend m_frontend;
+ bool m_enabled;
+};
+
+} // namespace blink
+
+
+#endif // !defined(V8ConsoleAgentImpl_h)

Powered by Google App Engine
This is Rietveld 408576698