| OLD | NEW | 
|     1 // Copyright 2014 The Chromium Authors. All rights reserved. |     1 // Copyright 2014 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/navigation_controller_impl.h" |     5 #include "content/browser/frame_host/navigation_controller_impl.h" | 
|     6  |     6  | 
|     7 #include <stdint.h> |     7 #include <stdint.h> | 
|     8 #include <utility> |     8 #include <utility> | 
|     9  |     9  | 
|    10 #include "base/bind.h" |    10 #include "base/bind.h" | 
| (...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   628   } |   628   } | 
|   629  |   629  | 
|   630  private: |   630  private: | 
|   631   void RenderFrameCreated(RenderFrameHost* render_frame_host) override { |   631   void RenderFrameCreated(RenderFrameHost* render_frame_host) override { | 
|   632     RenderFrameHostImpl* rfh = |   632     RenderFrameHostImpl* rfh = | 
|   633         static_cast<RenderFrameHostImpl*>(render_frame_host); |   633         static_cast<RenderFrameHostImpl*>(render_frame_host); | 
|   634  |   634  | 
|   635     // Don't pay attention to swapped out RenderFrameHosts in the main frame. |   635     // Don't pay attention to swapped out RenderFrameHosts in the main frame. | 
|   636     // TODO(nasko): Remove once swappedout:// is gone. |   636     // TODO(nasko): Remove once swappedout:// is gone. | 
|   637     // See https://crbug.com/357747. |   637     // See https://crbug.com/357747. | 
|   638     if (!RenderFrameHostImpl::IsRFHStateActive(rfh->rfh_state())) { |   638     if (!rfh->is_active()) { | 
|   639       DLOG(INFO) << "Skipping swapped out RFH: " |   639       DLOG(INFO) << "Skipping swapped out RFH: " | 
|   640                  << rfh->GetSiteInstance()->GetSiteURL(); |   640                  << rfh->GetSiteInstance()->GetSiteURL(); | 
|   641       return; |   641       return; | 
|   642     } |   642     } | 
|   643  |   643  | 
|   644     // If this object was not created with a specified frame tree node, then use |   644     // If this object was not created with a specified frame tree node, then use | 
|   645     // the first created active RenderFrameHost.  Once a node is selected, there |   645     // the first created active RenderFrameHost.  Once a node is selected, there | 
|   646     // shouldn't be any other frames being created. |   646     // shouldn't be any other frames being created. | 
|   647     int frame_tree_node_id = rfh->frame_tree_node()->frame_tree_node_id(); |   647     int frame_tree_node_id = rfh->frame_tree_node()->frame_tree_node_id(); | 
|   648     DCHECK(frame_tree_node_id_ == 0 || |   648     DCHECK(frame_tree_node_id_ == 0 || | 
| (...skipping 2865 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  3514   observer.Wait(); |  3514   observer.Wait(); | 
|  3515  |  3515  | 
|  3516   EXPECT_EQ(3, controller.GetEntryCount()); |  3516   EXPECT_EQ(3, controller.GetEntryCount()); | 
|  3517   EXPECT_EQ(3, RendererHistoryLength(shell())); |  3517   EXPECT_EQ(3, RendererHistoryLength(shell())); | 
|  3518   EXPECT_EQ(0, controller.GetLastCommittedEntryIndex()); |  3518   EXPECT_EQ(0, controller.GetLastCommittedEntryIndex()); | 
|  3519  |  3519  | 
|  3520   EXPECT_EQ(frame_url_1, frame->current_url()); |  3520   EXPECT_EQ(frame_url_1, frame->current_url()); | 
|  3521 } |  3521 } | 
|  3522  |  3522  | 
|  3523 }  // namespace content |  3523 }  // namespace content | 
| OLD | NEW |