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

Side by Side Diff: sky/engine/core/inspector/ConsoleMessageStorage.h

Issue 922893002: Merge the Sky Engine changes from the SkyDart branch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 SKY_ENGINE_CORE_INSPECTOR_CONSOLEMESSAGESTORAGE_H_
6 #define SKY_ENGINE_CORE_INSPECTOR_CONSOLEMESSAGESTORAGE_H_
7
8 #include "sky/engine/core/inspector/ConsoleMessage.h"
9 #include "sky/engine/platform/heap/Handle.h"
10 #include "sky/engine/wtf/Deque.h"
11 #include "sky/engine/wtf/Forward.h"
12
13 namespace blink {
14
15 class LocalDOMWindow;
16
17 class ConsoleMessageStorage final {
18 WTF_MAKE_NONCOPYABLE(ConsoleMessageStorage);
19 WTF_MAKE_FAST_ALLOCATED;
20 public:
21 static PassOwnPtr<ConsoleMessageStorage> createForFrame(LocalFrame* frame)
22 {
23 return adoptPtr(new ConsoleMessageStorage(frame));
24 }
25
26 void reportMessage(PassRefPtr<ConsoleMessage>);
27 void clear();
28
29 Vector<unsigned> argumentCounts() const;
30
31 void frameWindowDiscarded(LocalDOMWindow*);
32
33 size_t size() const;
34 ConsoleMessage* at(size_t index) const;
35
36 int expiredCount() const;
37
38 private:
39 explicit ConsoleMessageStorage(ExecutionContext*);
40 explicit ConsoleMessageStorage(LocalFrame*);
41
42 ExecutionContext* executionContext() const;
43
44 int m_expiredCount;
45 Deque<RefPtr<ConsoleMessage> > m_messages;
46 RawPtr<ExecutionContext> m_context;
47 LocalFrame* m_frame;
48 };
49
50 } // namespace blink
51
52 #endif // SKY_ENGINE_CORE_INSPECTOR_CONSOLEMESSAGESTORAGE_H_
OLDNEW
« no previous file with comments | « sky/engine/core/inspector/ConsoleMessage.cpp ('k') | sky/engine/core/inspector/ConsoleMessageStorage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698