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

Side by Side Diff: content/browser/frame_host/frame_tree.h

Issue 1728253003: Make NodeIterator more STL-friendly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_
6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <iterator>
10 #include <string> 11 #include <string>
11 12
12 #include "base/callback.h" 13 #include "base/callback.h"
13 #include "base/gtest_prod_util.h" 14 #include "base/gtest_prod_util.h"
14 #include "base/macros.h" 15 #include "base/macros.h"
15 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
16 #include "content/browser/frame_host/frame_tree_node.h" 17 #include "content/browser/frame_host/frame_tree_node.h"
17 #include "content/common/content_export.h" 18 #include "content/common/content_export.h"
18 19
19 namespace content { 20 namespace content {
(...skipping 15 matching lines...) Expand all
35 // page navigations. 36 // page navigations.
36 // 37 //
37 // TODO(ajwong): Move NavigationController ownership to the main frame 38 // TODO(ajwong): Move NavigationController ownership to the main frame
38 // FrameTreeNode. Possibly expose access to it from here. 39 // FrameTreeNode. Possibly expose access to it from here.
39 // 40 //
40 // This object is only used on the UI thread. 41 // This object is only used on the UI thread.
41 class CONTENT_EXPORT FrameTree { 42 class CONTENT_EXPORT FrameTree {
42 public: 43 public:
43 class NodeRange; 44 class NodeRange;
44 45
45 class CONTENT_EXPORT NodeIterator { 46 class CONTENT_EXPORT NodeIterator
47 : public std::iterator<std::forward_iterator_tag, FrameTreeNode> {
46 public: 48 public:
47 ~NodeIterator(); 49 ~NodeIterator();
48 50
49 NodeIterator& operator++(); 51 NodeIterator& operator++();
50 52
51 bool operator==(const NodeIterator& rhs) const; 53 bool operator==(const NodeIterator& rhs) const;
52 bool operator!=(const NodeIterator& rhs) const { return !(*this == rhs); } 54 bool operator!=(const NodeIterator& rhs) const { return !(*this == rhs); }
53 55
54 FrameTreeNode* operator*() { return current_node_; } 56 FrameTreeNode* operator*() { return current_node_; }
55 57
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 248
247 // Overall load progress. 249 // Overall load progress.
248 double load_progress_; 250 double load_progress_;
249 251
250 DISALLOW_COPY_AND_ASSIGN(FrameTree); 252 DISALLOW_COPY_AND_ASSIGN(FrameTree);
251 }; 253 };
252 254
253 } // namespace content 255 } // namespace content
254 256
255 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ 257 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698