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

Side by Side Diff: Source/web/OpenedFrameTracker.h

Issue 271793002: Implement WebFrame::swap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix typo Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/web/OpenedFrameTracker.cpp » ('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 2014 The Chromium Authors. All rights reserved. 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 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 OpenedFrameTracker_h 5 #ifndef OpenedFrameTracker_h
6 #define OpenedFrameTracker_h 6 #define OpenedFrameTracker_h
7 7
8 #include "wtf/HashSet.h" 8 #include "wtf/HashSet.h"
9 #include "wtf/Noncopyable.h" 9 #include "wtf/Noncopyable.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class WebFrame; 13 class WebFrame;
14 14
15 // Small helper class to track the set of frames that a WebFrame has opened. 15 // Small helper class to track the set of frames that a WebFrame has opened.
16 // Due to layering restrictions, we need to hide the implementation, since 16 // Due to layering restrictions, we need to hide the implementation, since
17 // public/web/ cannot depend on wtf/. 17 // public/web/ cannot depend on wtf/.
18 class OpenedFrameTracker { 18 class OpenedFrameTracker {
19 WTF_MAKE_NONCOPYABLE(OpenedFrameTracker); 19 WTF_MAKE_NONCOPYABLE(OpenedFrameTracker);
20 public: 20 public:
21 OpenedFrameTracker(); 21 OpenedFrameTracker();
22 ~OpenedFrameTracker(); 22 ~OpenedFrameTracker();
23 23
24 bool isEmpty() const;
24 void add(WebFrame*); 25 void add(WebFrame*);
25 void remove(WebFrame*); 26 void remove(WebFrame*);
26 27
28 // Updates the opener for all tracked frames.
29 void updateOpener(WebFrame*);
30
27 private: 31 private:
28 WTF::HashSet<WebFrame*> m_openedFrames; 32 WTF::HashSet<WebFrame*> m_openedFrames;
29 }; 33 };
30 34
31 } // namespace blink 35 } // namespace blink
32 36
33 #endif // WebFramePrivate_h 37 #endif // WebFramePrivate_h
OLDNEW
« no previous file with comments | « no previous file | Source/web/OpenedFrameTracker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698