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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 // FrameTree::ForEach to stop all loads in the entire FrameTree. | 249 // FrameTree::ForEach to stop all loads in the entire FrameTree. |
250 bool StopLoading(); | 250 bool StopLoading(); |
251 | 251 |
252 // Returns the time this frame was last focused. | 252 // Returns the time this frame was last focused. |
253 base::TimeTicks last_focus_time() const { return last_focus_time_; } | 253 base::TimeTicks last_focus_time() const { return last_focus_time_; } |
254 | 254 |
255 // Called when this node becomes focused. Updates the node's last focused | 255 // Called when this node becomes focused. Updates the node's last focused |
256 // time and notifies observers. | 256 // time and notifies observers. |
257 void DidFocus(); | 257 void DidFocus(); |
258 | 258 |
| 259 // Called when the user closed the modal dialogue for BeforeUnload and |
| 260 // cancelled the navigation. This should stop the loads. |
| 261 void BeforeUnloadCanceled(); |
| 262 |
259 private: | 263 private: |
260 class OpenerDestroyedObserver; | 264 class OpenerDestroyedObserver; |
261 | 265 |
262 void set_parent(FrameTreeNode* parent) { parent_ = parent; } | 266 void set_parent(FrameTreeNode* parent) { parent_ = parent; } |
263 | 267 |
264 // The next available browser-global FrameTreeNode ID. | 268 // The next available browser-global FrameTreeNode ID. |
265 static int next_frame_tree_node_id_; | 269 static int next_frame_tree_node_id_; |
266 | 270 |
267 // The FrameTree that owns us. | 271 // The FrameTree that owns us. |
268 FrameTree* frame_tree_; // not owned. | 272 FrameTree* frame_tree_; // not owned. |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 base::ObserverList<Observer> observers_; | 344 base::ObserverList<Observer> observers_; |
341 | 345 |
342 base::TimeTicks last_focus_time_; | 346 base::TimeTicks last_focus_time_; |
343 | 347 |
344 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); | 348 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); |
345 }; | 349 }; |
346 | 350 |
347 } // namespace content | 351 } // namespace content |
348 | 352 |
349 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ | 353 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ |
OLD | NEW |