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

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: 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
« no previous file with comments | « Source/core/inspector/ConsoleMessage.cpp ('k') | Source/core/inspector/ConsoleMessageStorage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..55c47e9da49cb66ed7ec28ecba6b478bb8e53e39
--- /dev/null
+++ b/Source/core/inspector/ConsoleMessageStorage.h
@@ -0,0 +1,54 @@
+// 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/Forward.h"
+
+namespace blink {
+
+class LocalDOMWindow;
+
+class ConsoleMessageStorage FINAL {
+ WTF_MAKE_NONCOPYABLE(ConsoleMessageStorage);
+ WTF_MAKE_FAST_ALLOCATED;
+public:
+ static PassOwnPtr<ConsoleMessageStorage> createForWorker(ExecutionContext* context)
+ {
+ return adoptPtr(new ConsoleMessageStorage(context));
+ }
+
+ static PassOwnPtr<ConsoleMessageStorage> createForFrame(LocalFrame* frame)
+ {
+ return adoptPtr(new ConsoleMessageStorage(frame));
+ }
+
+ void reportMessage(PassRefPtr<ConsoleMessage>);
+ void clear();
+
+ Vector<unsigned> argumentCounts() const;
+ void frameWindowDiscarded(LocalDOMWindow*);
+
+ size_t size() const;
+ PassRefPtr<ConsoleMessage> at(size_t index) const;
+
+ int expiredCount() const;
+
+private:
+ ConsoleMessageStorage(ExecutionContext*);
+ ConsoleMessageStorage(LocalFrame*);
+
+ ExecutionContext* executionContext() const;
+
+ int m_expiredCount;
+ Vector<RefPtr<ConsoleMessage> > m_messages;
+ ExecutionContext* m_context;
+ LocalFrame* m_frame;
+};
+
+} // namespace blink
+
+#endif // ConsoleMessageStorage_h
« no previous file with comments | « Source/core/inspector/ConsoleMessage.cpp ('k') | Source/core/inspector/ConsoleMessageStorage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698