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" | |
| 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 { | |
|
vsevik
2014/08/14 08:06:22
WTF_MAKE_NONCOPYABLE(ConsoleMessageStorage);
W
kozyatinskiy1
2014/08/20 13:44:18
Done.
| |
| 20 public: | |
| 21 static PassOwnPtr<ConsoleMessageStorage> create() | |
| 22 { | |
| 23 return adoptPtr(new ConsoleMessageStorage()); | |
| 24 } | |
| 25 | |
| 26 void addMessage(PassRefPtr<ConsoleMessage>); | |
| 27 void clear(); | |
| 28 | |
| 29 Vector<unsigned> argumentCounts(); | |
| 30 void windowCleared(LocalDOMWindow*); | |
| 31 | |
| 32 size_t size() const; | |
| 33 PassRefPtr<ConsoleMessage> at(size_t index); | |
| 34 | |
| 35 int expiredCount() const; | |
| 36 | |
| 37 private: | |
| 38 ConsoleMessageStorage(); | |
| 39 | |
| 40 int m_expiredCount; | |
| 41 Vector<RefPtr<ConsoleMessage> > m_messages; | |
| 42 }; | |
| 43 | |
| 44 } // namespace blink | |
| 45 | |
| 46 #endif // ConsoleMessageStorage_h | |
| OLD | NEW |