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_NODE_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 RenderFrameHostImpl* current_frame_host() const { | 199 RenderFrameHostImpl* current_frame_host() const { |
200 return render_manager_.current_frame_host(); | 200 return render_manager_.current_frame_host(); |
201 } | 201 } |
202 | 202 |
203 bool IsDescendantOf(FrameTreeNode* other) const; | 203 bool IsDescendantOf(FrameTreeNode* other) const; |
204 | 204 |
205 // Return the node immediately preceding this node in its parent's | 205 // Return the node immediately preceding this node in its parent's |
206 // |children_|, or nullptr if there is no such node. | 206 // |children_|, or nullptr if there is no such node. |
207 FrameTreeNode* PreviousSibling() const; | 207 FrameTreeNode* PreviousSibling() const; |
208 | 208 |
| 209 // Return the node immediately following this node in its parent's |
| 210 // |children_|, or nullptr if there is no such node. |
| 211 FrameTreeNode* NextSibling() const; |
| 212 |
209 // Returns true if this node is in a loading state. | 213 // Returns true if this node is in a loading state. |
210 bool IsLoading() const; | 214 bool IsLoading() const; |
211 | 215 |
212 // Returns this node's loading progress. | 216 // Returns this node's loading progress. |
213 double loading_progress() const { return loading_progress_; } | 217 double loading_progress() const { return loading_progress_; } |
214 | 218 |
215 NavigationRequest* navigation_request() { return navigation_request_.get(); } | 219 NavigationRequest* navigation_request() { return navigation_request_.get(); } |
216 | 220 |
217 // PlzNavigate | 221 // PlzNavigate |
218 // Takes ownership of |navigation_request| and makes it the current | 222 // Takes ownership of |navigation_request| and makes it the current |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 // FrameTreeNode. | 273 // FrameTreeNode. |
270 void BeforeUnloadCanceled(); | 274 void BeforeUnloadCanceled(); |
271 | 275 |
272 private: | 276 private: |
273 class OpenerDestroyedObserver; | 277 class OpenerDestroyedObserver; |
274 | 278 |
275 void set_parent(FrameTreeNode* parent) { parent_ = parent; } | 279 void set_parent(FrameTreeNode* parent) { parent_ = parent; } |
276 | 280 |
277 void TraceSnapshot() const; | 281 void TraceSnapshot() const; |
278 | 282 |
| 283 FrameTreeNode* GetSibling(int relative_offset) const; |
| 284 |
279 // The next available browser-global FrameTreeNode ID. | 285 // The next available browser-global FrameTreeNode ID. |
280 static int next_frame_tree_node_id_; | 286 static int next_frame_tree_node_id_; |
281 | 287 |
282 // The FrameTree that owns us. | 288 // The FrameTree that owns us. |
283 FrameTree* frame_tree_; // not owned. | 289 FrameTree* frame_tree_; // not owned. |
284 | 290 |
285 // The Navigator object responsible for managing navigations at this node | 291 // The Navigator object responsible for managing navigations at this node |
286 // of the frame tree. | 292 // of the frame tree. |
287 scoped_refptr<Navigator> navigator_; | 293 scoped_refptr<Navigator> navigator_; |
288 | 294 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 base::ObserverList<Observer> observers_; | 356 base::ObserverList<Observer> observers_; |
351 | 357 |
352 base::TimeTicks last_focus_time_; | 358 base::TimeTicks last_focus_time_; |
353 | 359 |
354 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); | 360 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); |
355 }; | 361 }; |
356 | 362 |
357 } // namespace content | 363 } // namespace content |
358 | 364 |
359 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ | 365 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ |
OLD | NEW |