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 #include "content/browser/frame_host/frame_tree_node.h" | 5 #include "content/browser/frame_host/frame_tree_node.h" |
6 | 6 |
7 #include <queue> | 7 #include <queue> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 | 398 |
399 render_manager_.Stop(); | 399 render_manager_.Stop(); |
400 return true; | 400 return true; |
401 } | 401 } |
402 | 402 |
403 void FrameTreeNode::DidFocus() { | 403 void FrameTreeNode::DidFocus() { |
404 last_focus_time_ = base::TimeTicks::Now(); | 404 last_focus_time_ = base::TimeTicks::Now(); |
405 FOR_EACH_OBSERVER(Observer, observers_, OnFrameTreeNodeFocused(this)); | 405 FOR_EACH_OBSERVER(Observer, observers_, OnFrameTreeNodeFocused(this)); |
406 } | 406 } |
407 | 407 |
| 408 void FrameTreeNode::BeforeUnloadCanceled() { |
| 409 if (!IsMainFrame()) |
| 410 return; |
| 411 |
| 412 RenderFrameHostImpl* current_frame_host = |
| 413 render_manager_.current_frame_host(); |
| 414 DCHECK(current_frame_host); |
| 415 current_frame_host->ResetLoadingState(); |
| 416 |
| 417 if (IsBrowserSideNavigationEnabled()) { |
| 418 RenderFrameHostImpl* speculative_frame_host = |
| 419 render_manager_.speculative_frame_host(); |
| 420 if (speculative_frame_host) |
| 421 speculative_frame_host->ResetLoadingState(); |
| 422 } else { |
| 423 RenderFrameHostImpl* pending_frame_host = |
| 424 render_manager_.pending_frame_host(); |
| 425 if (pending_frame_host) |
| 426 pending_frame_host->ResetLoadingState(); |
| 427 } |
| 428 } |
| 429 |
408 } // namespace content | 430 } // namespace content |
OLD | NEW |