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

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, 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 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/OwnPtr.h"
vsevik 2014/08/25 13:04:01 try Forward.h
kozyatinskiy1 2014/08/25 14:12:39 Done.
10 #include "wtf/PassOwnPtr.h"
11 #include "wtf/PassRefPtr.h"
12 #include "wtf/RefPtr.h"
13 #include "wtf/Vector.h"
14
15 namespace blink {
16
17 class LocalDOMWindow;
18
19 class ConsoleMessageStorage FINAL {
20 WTF_MAKE_NONCOPYABLE(ConsoleMessageStorage);
21 WTF_MAKE_FAST_ALLOCATED;
22 public:
23 static PassOwnPtr<ConsoleMessageStorage> create(ExecutionContext* context, L ocalFrame* frame = 0)
24 {
25 return adoptPtr(new ConsoleMessageStorage(context, frame));
26 }
27
28 void reportMessage(PassRefPtr<ConsoleMessage>);
29 void clear();
30
31 Vector<unsigned> argumentCounts();
32 void windowCleared(LocalDOMWindow*);
33
34 size_t size() const;
35 PassRefPtr<ConsoleMessage> at(size_t index);
36
37 int expiredCount() const;
38
39 private:
40 ConsoleMessageStorage(ExecutionContext*, LocalFrame*);
41
42 ExecutionContext* executionContext() const;
43
44 int m_expiredCount;
45 Vector<RefPtr<ConsoleMessage> > m_messages;
46 ExecutionContext* m_context;
47 LocalFrame* m_frame;
48 };
49
50 } // namespace blink
51
52 #endif // ConsoleMessageStorage_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698