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

Side by Side 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, 3 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef ConsoleMessageStorage_h
6 #define ConsoleMessageStorage_h
7
8 #include "core/inspector/ConsoleMessage.h"
9 #include "wtf/Forward.h"
10
11 namespace blink {
12
13 class LocalDOMWindow;
14
15 class ConsoleMessageStorage FINAL {
16 WTF_MAKE_NONCOPYABLE(ConsoleMessageStorage);
17 WTF_MAKE_FAST_ALLOCATED;
18 public:
19 static PassOwnPtr<ConsoleMessageStorage> createForWorker(ExecutionContext* c ontext)
20 {
21 return adoptPtr(new ConsoleMessageStorage(context));
22 }
23
24 static PassOwnPtr<ConsoleMessageStorage> createForFrame(LocalFrame* frame)
25 {
26 return adoptPtr(new ConsoleMessageStorage(frame));
27 }
28
29 void reportMessage(PassRefPtr<ConsoleMessage>);
30 void clear();
31
32 Vector<unsigned> argumentCounts() const;
33 void frameWindowDiscarded(LocalDOMWindow*);
34
35 size_t size() const;
36 PassRefPtr<ConsoleMessage> at(size_t index) const;
37
38 int expiredCount() const;
39
40 private:
41 ConsoleMessageStorage(ExecutionContext*);
42 ConsoleMessageStorage(LocalFrame*);
43
44 ExecutionContext* executionContext() const;
45
46 int m_expiredCount;
47 Vector<RefPtr<ConsoleMessage> > m_messages;
48 ExecutionContext* m_context;
49 LocalFrame* m_frame;
50 };
51
52 } // namespace blink
53
54 #endif // ConsoleMessageStorage_h
OLDNEW
« 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