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 #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::RenderViewTerminated(RenderViewHostImpl* render_view_host) { | |
| 402 RenderFrameHostImpl* current_frame_host = | |
| 403 render_manager_.current_frame_host(); | |
| 404 DCHECK(current_frame_host); | |
| 405 if (current_frame_host->render_view_host() == render_view_host) | |
|
nasko
2016/01/15 01:19:16
Loading state is no longer associated with RenderV
clamy
2016/01/15 16:47:44
Done.
| |
| 406 current_frame_host->ResetLoadingState(); | |
| 407 | |
| 408 RenderFrameHostImpl* pending_frame_host = | |
| 409 render_manager_.pending_frame_host(); | |
| 410 if (pending_frame_host && | |
| 411 pending_frame_host->render_view_host() == render_view_host) { | |
| 412 pending_frame_host->ResetLoadingState(); | |
| 413 } | |
| 414 | |
| 415 if (IsBrowserSideNavigationEnabled()) { | |
| 416 RenderFrameHostImpl* speculative_frame_host = | |
| 417 render_manager_.speculative_frame_host(); | |
| 418 if (speculative_frame_host && | |
| 419 speculative_frame_host->render_view_host() == render_view_host) { | |
| 420 speculative_frame_host->ResetLoadingState(); | |
| 421 } | |
| 422 } | |
| 423 } | |
| 424 | |
| 425 void FrameTreeNode::BeforeUnloadCanceled() { | |
| 426 if (!IsMainFrame()) | |
| 427 return; | |
| 428 | |
| 429 RenderFrameHostImpl* current_frame_host = | |
| 430 render_manager_.current_frame_host(); | |
| 431 DCHECK(current_frame_host); | |
| 432 current_frame_host->ResetLoadingState(); | |
| 433 | |
| 434 RenderFrameHostImpl* pending_frame_host = | |
| 435 render_manager_.pending_frame_host(); | |
| 436 if (pending_frame_host) | |
| 437 pending_frame_host->ResetLoadingState(); | |
| 438 | |
| 439 if (IsBrowserSideNavigationEnabled()) { | |
| 440 RenderFrameHostImpl* speculative_frame_host = | |
| 441 render_manager_.speculative_frame_host(); | |
| 442 if (speculative_frame_host) | |
| 443 speculative_frame_host->ResetLoadingState(); | |
| 444 } | |
| 445 } | |
| 446 | |
| 447 | |
| 401 } // namespace content | 448 } // namespace content |
| OLD | NEW |