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

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

Issue 464293002: [DevTools] ConsoleMessage storage moved from ConsoleAgent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@remove-can-generate
Patch Set: Rebased 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/ConsoleMessageStorage.h
diff --git a/Source/core/inspector/ConsoleMessageStorage.h b/Source/core/inspector/ConsoleMessageStorage.h
new file mode 100644
index 0000000000000000000000000000000000000000..8169384077268e68feebd29129f9faf944651fc9
--- /dev/null
+++ b/Source/core/inspector/ConsoleMessageStorage.h
@@ -0,0 +1,46 @@
+// 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 ConsoleMessageStorage_h
+#define ConsoleMessageStorage_h
+
+#include "core/inspector/ConsoleMessage.h"
+#include "wtf/OwnPtr.h"
+#include "wtf/PassOwnPtr.h"
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefPtr.h"
+#include "wtf/Vector.h"
+
+namespace blink {
+
+class LocalDOMWindow;
+
+class ConsoleMessageStorage FINAL {
vsevik 2014/08/14 08:06:22 WTF_MAKE_NONCOPYABLE(ConsoleMessageStorage); W
kozyatinskiy1 2014/08/20 13:44:18 Done.
+public:
+ static PassOwnPtr<ConsoleMessageStorage> create()
+ {
+ return adoptPtr(new ConsoleMessageStorage());
+ }
+
+ void addMessage(PassRefPtr<ConsoleMessage>);
+ void clear();
+
+ Vector<unsigned> argumentCounts();
+ void windowCleared(LocalDOMWindow*);
+
+ size_t size() const;
+ PassRefPtr<ConsoleMessage> at(size_t index);
+
+ int expiredCount() const;
+
+private:
+ ConsoleMessageStorage();
+
+ int m_expiredCount;
+ Vector<RefPtr<ConsoleMessage> > m_messages;
+};
+
+} // namespace blink
+
+#endif // ConsoleMessageStorage_h

Powered by Google App Engine
This is Rietveld 408576698