Chromium Code Reviews| 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..1c74b0e5680a57c7a13049e9d438b91231552a1a |
| --- /dev/null |
| +++ b/Source/core/inspector/ConsoleMessageStorage.h |
| @@ -0,0 +1,52 @@ |
| +// 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/OwnPtr.h" |
|
vsevik
2014/08/25 13:04:01
try Forward.h
kozyatinskiy1
2014/08/25 14:12:39
Done.
|
| +#include "wtf/PassOwnPtr.h" |
| +#include "wtf/PassRefPtr.h" |
| +#include "wtf/RefPtr.h" |
| +#include "wtf/Vector.h" |
| + |
| +namespace blink { |
| + |
| +class LocalDOMWindow; |
| + |
| +class ConsoleMessageStorage FINAL { |
| + WTF_MAKE_NONCOPYABLE(ConsoleMessageStorage); |
| + WTF_MAKE_FAST_ALLOCATED; |
| +public: |
| + static PassOwnPtr<ConsoleMessageStorage> create(ExecutionContext* context, LocalFrame* frame = 0) |
| + { |
| + return adoptPtr(new ConsoleMessageStorage(context, frame)); |
| + } |
| + |
| + void reportMessage(PassRefPtr<ConsoleMessage>); |
| + void clear(); |
| + |
| + Vector<unsigned> argumentCounts(); |
| + void windowCleared(LocalDOMWindow*); |
| + |
| + size_t size() const; |
| + PassRefPtr<ConsoleMessage> at(size_t index); |
| + |
| + int expiredCount() const; |
| + |
| +private: |
| + ConsoleMessageStorage(ExecutionContext*, LocalFrame*); |
| + |
| + ExecutionContext* executionContext() const; |
| + |
| + int m_expiredCount; |
| + Vector<RefPtr<ConsoleMessage> > m_messages; |
| + ExecutionContext* m_context; |
| + LocalFrame* m_frame; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // ConsoleMessageStorage_h |