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

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

Issue 1820043002: Update nested OOPIF's screen rects when parent is repositioned in page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nasko comments addressed Created 4 years, 9 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
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 <iterator>
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 }; 68 };
69 69
70 class CONTENT_EXPORT NodeRange { 70 class CONTENT_EXPORT NodeRange {
71 public: 71 public:
72 NodeIterator begin(); 72 NodeIterator begin();
73 NodeIterator end(); 73 NodeIterator end();
74 74
75 private: 75 private:
76 friend class FrameTree; 76 friend class FrameTree;
77 77
78 NodeRange(FrameTree* tree, FrameTreeNode* node_to_skip); 78 NodeRange(FrameTreeNode* root, FrameTreeNode* node_to_skip);
79 79
80 FrameTree* const tree_; 80 FrameTreeNode* const root_;
81 FrameTreeNode* const node_to_skip_; 81 FrameTreeNode* const node_to_skip_;
82 }; 82 };
83 83
84 class CONTENT_EXPORT ConstNodeIterator { 84 class CONTENT_EXPORT ConstNodeIterator {
85 public: 85 public:
86 ~ConstNodeIterator(); 86 ~ConstNodeIterator();
87 87
88 ConstNodeIterator& operator++(); 88 ConstNodeIterator& operator++();
89 89
90 bool operator==(const ConstNodeIterator& rhs) const; 90 bool operator==(const ConstNodeIterator& rhs) const;
(...skipping 13 matching lines...) Expand all
104 }; 104 };
105 105
106 class CONTENT_EXPORT ConstNodeRange { 106 class CONTENT_EXPORT ConstNodeRange {
107 public: 107 public:
108 ConstNodeIterator begin(); 108 ConstNodeIterator begin();
109 ConstNodeIterator end(); 109 ConstNodeIterator end();
110 110
111 private: 111 private:
112 friend class FrameTree; 112 friend class FrameTree;
113 113
114 ConstNodeRange(const FrameTree* tree); 114 ConstNodeRange(const FrameTreeNode* root);
115 115
116 const FrameTree* const tree_; 116 const FrameTreeNode* const root_;
117 }; 117 };
118 118
119 // Each FrameTreeNode will default to using the given |navigator| for 119 // Each FrameTreeNode will default to using the given |navigator| for
120 // navigation tasks in the frame. 120 // navigation tasks in the frame.
121 // A set of delegates are remembered here so that we can create 121 // A set of delegates are remembered here so that we can create
122 // RenderFrameHostManagers. 122 // RenderFrameHostManagers.
123 // TODO(creis): This set of delegates will change as we move things to 123 // TODO(creis): This set of delegates will change as we move things to
124 // Navigator. 124 // Navigator.
125 FrameTree(Navigator* navigator, 125 FrameTree(Navigator* navigator,
126 RenderFrameHostDelegate* render_frame_delegate, 126 RenderFrameHostDelegate* render_frame_delegate,
(...skipping 14 matching lines...) Expand all
141 // Returns the first frame in this tree with the given |name|, or the main 141 // Returns the first frame in this tree with the given |name|, or the main
142 // frame if |name| is empty. 142 // frame if |name| is empty.
143 // Note that this does NOT support pseudo-names like _self, _top, and _blank, 143 // Note that this does NOT support pseudo-names like _self, _top, and _blank,
144 // nor searching other FrameTrees (unlike blink::WebView::findFrameByName). 144 // nor searching other FrameTrees (unlike blink::WebView::findFrameByName).
145 FrameTreeNode* FindByName(const std::string& name); 145 FrameTreeNode* FindByName(const std::string& name);
146 146
147 // Returns a range to iterate over all FrameTreeNodes in the frame tree in 147 // Returns a range to iterate over all FrameTreeNodes in the frame tree in
148 // breadth-first traversal order. 148 // breadth-first traversal order.
149 NodeRange Nodes(); 149 NodeRange Nodes();
150 150
151 // Returns a range to iterate over all FrameTreeNodes in a subtree of the
152 // frame tree, starting from |subtree_root|.
153 NodeRange SubtreeNodes(FrameTreeNode* subtree_root);
154
151 // Returns a range to iterate over all FrameTreeNodes in the frame tree in 155 // Returns a range to iterate over all FrameTreeNodes in the frame tree in
152 // breadth-first traversal order. All FrameTreeNodes returned will be const. 156 // breadth-first traversal order. All FrameTreeNodes returned will be const.
153 ConstNodeRange ConstNodes() const; 157 ConstNodeRange ConstNodes() const;
154 158
155 // Adds a new child frame to the frame tree. |process_id| is required to 159 // Adds a new child frame to the frame tree. |process_id| is required to
156 // disambiguate |new_routing_id|, and it must match the process of the 160 // disambiguate |new_routing_id|, and it must match the process of the
157 // |parent| node. Otherwise no child is added and this method returns false. 161 // |parent| node. Otherwise no child is added and this method returns false.
158 bool AddFrame(FrameTreeNode* parent, 162 bool AddFrame(FrameTreeNode* parent,
159 int process_id, 163 int process_id,
160 int new_routing_id, 164 int new_routing_id,
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 294
291 // Overall load progress. 295 // Overall load progress.
292 double load_progress_; 296 double load_progress_;
293 297
294 DISALLOW_COPY_AND_ASSIGN(FrameTree); 298 DISALLOW_COPY_AND_ASSIGN(FrameTree);
295 }; 299 };
296 300
297 } // namespace content 301 } // namespace content
298 302
299 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ 303 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/cross_process_frame_connector.cc ('k') | content/browser/frame_host/frame_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698