Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 | |
| OLD | NEW |