| 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/render_frame_host_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1223 proxy->frame_tree_node()->current_replication_state(); | 1223 proxy->frame_tree_node()->current_replication_state(); |
| 1224 Send(new FrameMsg_SwapOut(routing_id_, proxy->GetRoutingID(), is_loading, | 1224 Send(new FrameMsg_SwapOut(routing_id_, proxy->GetRoutingID(), is_loading, |
| 1225 replication_state)); | 1225 replication_state)); |
| 1226 } | 1226 } |
| 1227 | 1227 |
| 1228 // TODO(nasko): If the frame is not live, the RFH should just be deleted by | 1228 // TODO(nasko): If the frame is not live, the RFH should just be deleted by |
| 1229 // simulating the receipt of swap out ack. | 1229 // simulating the receipt of swap out ack. |
| 1230 is_waiting_for_swapout_ack_ = true; | 1230 is_waiting_for_swapout_ack_ = true; |
| 1231 if (frame_tree_node_->IsMainFrame()) | 1231 if (frame_tree_node_->IsMainFrame()) |
| 1232 render_view_host_->set_is_active(false); | 1232 render_view_host_->set_is_active(false); |
| 1233 | |
| 1234 if (!GetParent()) | |
| 1235 delegate_->SwappedOut(this); | |
| 1236 } | 1233 } |
| 1237 | 1234 |
| 1238 void RenderFrameHostImpl::OnBeforeUnloadACK( | 1235 void RenderFrameHostImpl::OnBeforeUnloadACK( |
| 1239 bool proceed, | 1236 bool proceed, |
| 1240 const base::TimeTicks& renderer_before_unload_start_time, | 1237 const base::TimeTicks& renderer_before_unload_start_time, |
| 1241 const base::TimeTicks& renderer_before_unload_end_time) { | 1238 const base::TimeTicks& renderer_before_unload_end_time) { |
| 1242 TRACE_EVENT_ASYNC_END1("navigation", "RenderFrameHostImpl BeforeUnload", this, | 1239 TRACE_EVENT_ASYNC_END1("navigation", "RenderFrameHostImpl BeforeUnload", this, |
| 1243 "FrameTreeNode id", | 1240 "FrameTreeNode id", |
| 1244 frame_tree_node_->frame_tree_node_id()); | 1241 frame_tree_node_->frame_tree_node_id()); |
| 1245 DCHECK(!GetParent()); | 1242 DCHECK(!GetParent()); |
| (...skipping 1520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2766 // handler after it's destroyed so it can't run after the RFHI is destroyed. | 2763 // handler after it's destroyed so it can't run after the RFHI is destroyed. |
| 2767 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 2764 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
| 2768 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 2765 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
| 2769 } | 2766 } |
| 2770 | 2767 |
| 2771 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 2768 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
| 2772 web_bluetooth_service_.reset(); | 2769 web_bluetooth_service_.reset(); |
| 2773 } | 2770 } |
| 2774 | 2771 |
| 2775 } // namespace content | 2772 } // namespace content |
| OLD | NEW |