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

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

Issue 2151273003: [DevTools] Move browser logging from Console domain to Log domain. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@internals-method
Patch Set: protocol improvements Created 4 years, 5 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/InspectorLogAgent.h
diff --git a/third_party/WebKit/Source/core/inspector/InspectorLogAgent.h b/third_party/WebKit/Source/core/inspector/InspectorLogAgent.h
new file mode 100644
index 0000000000000000000000000000000000000000..013c8e20dab8f83c9ea9bd3d896ab895f64ecfd4
--- /dev/null
+++ b/third_party/WebKit/Source/core/inspector/InspectorLogAgent.h
@@ -0,0 +1,41 @@
+// 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 InspectorLogAgent_h
+#define InspectorLogAgent_h
+
+#include "core/CoreExport.h"
+#include "core/inspector/InspectorBaseAgent.h"
+#include "core/inspector/protocol/Log.h"
+
+namespace blink {
+
+class ConsoleMessage;
+class ConsoleMessageStorage;
+
+class CORE_EXPORT InspectorLogAgent : public InspectorBaseAgent<protocol::Log::Metainfo> {
+ WTF_MAKE_NONCOPYABLE(InspectorLogAgent);
+public:
+ explicit InspectorLogAgent(ConsoleMessageStorage*);
+ ~InspectorLogAgent() override;
+ DECLARE_VIRTUAL_TRACE();
+
+ void restore() override;
+
+ // Called from InspectorInstrumentation.
+ void consoleMessageAdded(ConsoleMessage*);
+
+ // Protocol methods.
+ void enable(ErrorString*) override;
+ void disable(ErrorString*) override;
+ void clear(ErrorString*) override;
+
+private:
+ bool m_enabled;
+ Member<ConsoleMessageStorage> m_storage;
+};
+
+} // namespace blink
+
+#endif // !defined(InspectorLogAgent_h)

Powered by Google App Engine
This is Rietveld 408576698