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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
391 | 391 |
392 render_manager_.Stop(); | 392 render_manager_.Stop(); |
393 return true; | 393 return true; |
394 } | 394 } |
395 | 395 |
396 void FrameTreeNode::DidFocus() { | 396 void FrameTreeNode::DidFocus() { |
397 last_focus_time_ = base::TimeTicks::Now(); | 397 last_focus_time_ = base::TimeTicks::Now(); |
398 FOR_EACH_OBSERVER(Observer, observers_, OnFrameTreeNodeFocused(this)); | 398 FOR_EACH_OBSERVER(Observer, observers_, OnFrameTreeNodeFocused(this)); |
399 } | 399 } |
400 | 400 |
401 void FrameTreeNode::BeforeUnloadCanceled() { | |
402 if (!IsMainFrame()) | |
403 return; | |
404 | |
405 RenderFrameHostImpl* current_frame_host = | |
406 render_manager_.current_frame_host(); | |
407 DCHECK(current_frame_host); | |
408 current_frame_host->ResetLoadingState(); | |
409 | |
410 RenderFrameHostImpl* pending_frame_host = | |
411 render_manager_.pending_frame_host(); | |
412 if (pending_frame_host) | |
413 pending_frame_host->ResetLoadingState(); | |
nasko
2016/01/16 00:13:51
Do we need to touch the pending and speculative RF
clamy
2016/01/19 13:31:18
BrowserTest.CancelBeforeUnloadResetsURL is failing
| |
414 | |
415 if (IsBrowserSideNavigationEnabled()) { | |
416 RenderFrameHostImpl* speculative_frame_host = | |
417 render_manager_.speculative_frame_host(); | |
418 if (speculative_frame_host) | |
419 speculative_frame_host->ResetLoadingState(); | |
420 } | |
421 } | |
422 | |
423 | |
401 } // namespace content | 424 } // namespace content |
OLD | NEW |