OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |