Chromium Code Reviews| 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> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 16 #include "content/browser/frame_host/frame_tree_node_blame_context.h" | |
| 16 #include "content/browser/frame_host/render_frame_host_impl.h" | 17 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 17 #include "content/browser/frame_host/render_frame_host_manager.h" | 18 #include "content/browser/frame_host/render_frame_host_manager.h" |
| 18 #include "content/common/content_export.h" | 19 #include "content/common/content_export.h" |
| 19 #include "content/common/frame_replication_state.h" | 20 #include "content/common/frame_replication_state.h" |
| 20 #include "third_party/WebKit/public/web/WebFrameOwnerProperties.h" | 21 #include "third_party/WebKit/public/web/WebFrameOwnerProperties.h" |
| 21 #include "url/gurl.h" | 22 #include "url/gurl.h" |
| 22 #include "url/origin.h" | 23 #include "url/origin.h" |
| 23 | 24 |
| 24 namespace content { | 25 namespace content { |
| 25 | 26 |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 258 | 259 |
| 259 // Called when this node becomes focused. Updates the node's last focused | 260 // Called when this node becomes focused. Updates the node's last focused |
| 260 // time and notifies observers. | 261 // time and notifies observers. |
| 261 void DidFocus(); | 262 void DidFocus(); |
| 262 | 263 |
| 263 // Called when the user closed the modal dialogue for BeforeUnload and | 264 // Called when the user closed the modal dialogue for BeforeUnload and |
| 264 // cancelled the navigation. This should stop any load happening in the | 265 // cancelled the navigation. This should stop any load happening in the |
| 265 // FrameTreeNode. | 266 // FrameTreeNode. |
| 266 void BeforeUnloadCanceled(); | 267 void BeforeUnloadCanceled(); |
| 267 | 268 |
| 269 FrameTreeNodeBlameContext* blame_context() const { return blame_context_; } | |
|
Charlie Reis
2016/04/20 16:58:58
These all need comments, because it's not obvious
Xiaocheng
2016/04/21 08:01:32
Done.
| |
| 270 | |
| 271 void InitializeBlameContext(); | |
| 272 | |
| 268 private: | 273 private: |
| 269 class OpenerDestroyedObserver; | 274 class OpenerDestroyedObserver; |
| 270 | 275 |
| 271 void set_parent(FrameTreeNode* parent) { parent_ = parent; } | 276 void set_parent(FrameTreeNode* parent) { parent_ = parent; } |
| 272 | 277 |
| 273 void TraceSnapshot() const; | |
| 274 | |
| 275 // The next available browser-global FrameTreeNode ID. | 278 // The next available browser-global FrameTreeNode ID. |
| 276 static int next_frame_tree_node_id_; | 279 static int next_frame_tree_node_id_; |
| 277 | 280 |
| 278 // The FrameTree that owns us. | 281 // The FrameTree that owns us. |
| 279 FrameTree* frame_tree_; // not owned. | 282 FrameTree* frame_tree_; // not owned. |
| 280 | 283 |
| 281 // The Navigator object responsible for managing navigations at this node | 284 // The Navigator object responsible for managing navigations at this node |
| 282 // of the frame tree. | 285 // of the frame tree. |
| 283 scoped_refptr<Navigator> navigator_; | 286 scoped_refptr<Navigator> navigator_; |
| 284 | 287 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 340 // PlzNavigate | 343 // PlzNavigate |
| 341 // Owns an ongoing NavigationRequest until it is ready to commit. It will then | 344 // Owns an ongoing NavigationRequest until it is ready to commit. It will then |
| 342 // be reset and a RenderFrameHost will be responsible for the navigation. | 345 // be reset and a RenderFrameHost will be responsible for the navigation. |
| 343 std::unique_ptr<NavigationRequest> navigation_request_; | 346 std::unique_ptr<NavigationRequest> navigation_request_; |
| 344 | 347 |
| 345 // List of objects observing this FrameTreeNode. | 348 // List of objects observing this FrameTreeNode. |
| 346 base::ObserverList<Observer> observers_; | 349 base::ObserverList<Observer> observers_; |
| 347 | 350 |
| 348 base::TimeTicks last_focus_time_; | 351 base::TimeTicks last_focus_time_; |
| 349 | 352 |
| 353 FrameTreeNodeBlameContext* blame_context_; // Not owned. | |
| 354 | |
| 350 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); | 355 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); |
| 351 }; | 356 }; |
| 352 | 357 |
| 353 } // namespace content | 358 } // namespace content |
| 354 | 359 |
| 355 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ | 360 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ |
| OLD | NEW |