| 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 <string> | 10 #include <string> |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 // FrameTree::ForEach to stop all loads in the entire FrameTree. | 229 // FrameTree::ForEach to stop all loads in the entire FrameTree. |
| 230 bool StopLoading(); | 230 bool StopLoading(); |
| 231 | 231 |
| 232 // Returns the time this frame was last focused. | 232 // Returns the time this frame was last focused. |
| 233 base::TimeTicks last_focus_time() const { return last_focus_time_; } | 233 base::TimeTicks last_focus_time() const { return last_focus_time_; } |
| 234 | 234 |
| 235 // Called when this node becomes focused. Updates the node's last focused | 235 // Called when this node becomes focused. Updates the node's last focused |
| 236 // time and notifies observers. | 236 // time and notifies observers. |
| 237 void DidFocus(); | 237 void DidFocus(); |
| 238 | 238 |
| 239 // Called when the user closed the modal dialogue for BeforeUnload and |
| 240 // cancelled the navigation. This should stop the loads. |
| 241 void BeforeUnloadCanceled(); |
| 242 |
| 239 private: | 243 private: |
| 240 class OpenerDestroyedObserver; | 244 class OpenerDestroyedObserver; |
| 241 | 245 |
| 242 void set_parent(FrameTreeNode* parent) { parent_ = parent; } | 246 void set_parent(FrameTreeNode* parent) { parent_ = parent; } |
| 243 | 247 |
| 244 // The next available browser-global FrameTreeNode ID. | 248 // The next available browser-global FrameTreeNode ID. |
| 245 static int next_frame_tree_node_id_; | 249 static int next_frame_tree_node_id_; |
| 246 | 250 |
| 247 // The FrameTree that owns us. | 251 // The FrameTree that owns us. |
| 248 FrameTree* frame_tree_; // not owned. | 252 FrameTree* frame_tree_; // not owned. |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 base::ObserverList<Observer> observers_; | 327 base::ObserverList<Observer> observers_; |
| 324 | 328 |
| 325 base::TimeTicks last_focus_time_; | 329 base::TimeTicks last_focus_time_; |
| 326 | 330 |
| 327 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); | 331 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); |
| 328 }; | 332 }; |
| 329 | 333 |
| 330 } // namespace content | 334 } // namespace content |
| 331 | 335 |
| 332 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ | 336 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ |
| OLD | NEW |