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

Side by Side Diff: third_party/WebKit/Source/core/inspector/InspectedFrames.h

Issue 1434383002: Oilpan: move InspectedFrames to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix incorrect OwnPtr<> use Created 5 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/inspector/InspectorAnimationAgent.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef InspectedFrames_h 5 #ifndef InspectedFrames_h
6 #define InspectedFrames_h 6 #define InspectedFrames_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "platform/heap/Handle.h"
9 #include "wtf/Forward.h" 10 #include "wtf/Forward.h"
10 #include "wtf/Noncopyable.h" 11 #include "wtf/Noncopyable.h"
11 12
12 namespace blink { 13 namespace blink {
13 14
14 class LocalFrame; 15 class LocalFrame;
15 16
16 class CORE_EXPORT InspectedFrames { 17 class CORE_EXPORT InspectedFrames final : public NoBaseWillBeGarbageCollectedFin alized<InspectedFrames> {
17 WTF_MAKE_NONCOPYABLE(InspectedFrames); 18 WTF_MAKE_NONCOPYABLE(InspectedFrames);
19 USING_FAST_MALLOC_WILL_BE_REMOVED(InspectedFrames);
18 public: 20 public:
19 class CORE_EXPORT Iterator { 21 class CORE_EXPORT Iterator {
22 STACK_ALLOCATED();
20 public: 23 public:
21 Iterator operator++(int); 24 Iterator operator++(int);
22 Iterator& operator++(); 25 Iterator& operator++();
23 bool operator==(const Iterator& other); 26 bool operator==(const Iterator& other);
24 bool operator!=(const Iterator& other); 27 bool operator!=(const Iterator& other);
25 LocalFrame* operator*() { return m_current; } 28 LocalFrame* operator*() { return m_current; }
26 LocalFrame* operator->() { return m_current; } 29 LocalFrame* operator->() { return m_current; }
27 private: 30 private:
28 friend class InspectedFrames; 31 friend class InspectedFrames;
29 Iterator(LocalFrame* root, LocalFrame* current); 32 Iterator(LocalFrame* root, LocalFrame* current);
30 LocalFrame* m_root; 33 RawPtrWillBeMember<LocalFrame> m_root;
31 LocalFrame* m_current; 34 RawPtrWillBeMember<LocalFrame> m_current;
32 }; 35 };
33 36
34 explicit InspectedFrames(LocalFrame* root); 37 static PassOwnPtrWillBeRawPtr<InspectedFrames> create(LocalFrame* root)
38 {
39 return adoptPtrWillBeNoop(new InspectedFrames(root));
40 }
41
35 LocalFrame* root() { return m_root; } 42 LocalFrame* root() { return m_root; }
36 bool contains(LocalFrame*) const; 43 bool contains(LocalFrame*) const;
37 LocalFrame* frameWithSecurityOrigin(const String& originRawString); 44 LocalFrame* frameWithSecurityOrigin(const String& originRawString);
38 Iterator begin(); 45 Iterator begin();
39 Iterator end(); 46 Iterator end();
40 47
48 DEFINE_INLINE_TRACE()
49 {
50 visitor->trace(m_root);
51 }
52
41 private: 53 private:
42 LocalFrame* m_root; 54 explicit InspectedFrames(LocalFrame*);
55
56 RawPtrWillBeMember<LocalFrame> m_root;
43 }; 57 };
44 58
45 } // namespace blink 59 } // namespace blink
46 60
47 #endif // InspectedFrames_h 61 #endif // InspectedFrames_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/inspector/InspectorAnimationAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698