OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer_host/render_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 are_javascript_messages_suppressed_(false), | 184 are_javascript_messages_suppressed_(false), |
185 sudden_termination_allowed_(false), | 185 sudden_termination_allowed_(false), |
186 render_view_termination_status_(base::TERMINATION_STATUS_STILL_RUNNING) { | 186 render_view_termination_status_(base::TERMINATION_STATUS_STILL_RUNNING) { |
187 DCHECK(instance_.get()); | 187 DCHECK(instance_.get()); |
188 CHECK(delegate_); // http://crbug.com/82827 | 188 CHECK(delegate_); // http://crbug.com/82827 |
189 | 189 |
190 if (main_frame_routing_id == MSG_ROUTING_NONE) | 190 if (main_frame_routing_id == MSG_ROUTING_NONE) |
191 main_frame_routing_id = GetProcess()->GetNextRoutingID(); | 191 main_frame_routing_id = GetProcess()->GetNextRoutingID(); |
192 | 192 |
193 main_render_frame_host_ = RenderFrameHostFactory::Create( | 193 main_render_frame_host_ = RenderFrameHostFactory::Create( |
194 this, delegate_->GetFrameTree(), main_frame_routing_id, is_swapped_out_); | 194 this, delegate_->GetFrameTree(), delegate_->GetFrameTree()->root(), |
| 195 main_frame_routing_id, is_swapped_out_); |
195 | 196 |
196 GetProcess()->EnableSendQueue(); | 197 GetProcess()->EnableSendQueue(); |
197 | 198 |
198 if (!swapped_out) | 199 if (!swapped_out) |
199 instance_->increment_active_view_count(); | 200 instance_->increment_active_view_count(); |
200 | 201 |
201 if (ResourceDispatcherHostImpl::Get()) { | 202 if (ResourceDispatcherHostImpl::Get()) { |
202 BrowserThread::PostTask( | 203 BrowserThread::PostTask( |
203 BrowserThread::IO, FROM_HERE, | 204 BrowserThread::IO, FROM_HERE, |
204 base::Bind(&ResourceDispatcherHostImpl::OnRenderViewHostCreated, | 205 base::Bind(&ResourceDispatcherHostImpl::OnRenderViewHostCreated, |
(...skipping 2073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2278 void RenderViewHostImpl::AttachToFrameTree() { | 2279 void RenderViewHostImpl::AttachToFrameTree() { |
2279 FrameTree* frame_tree = delegate_->GetFrameTree(); | 2280 FrameTree* frame_tree = delegate_->GetFrameTree(); |
2280 | 2281 |
2281 frame_tree->SwapMainFrame(main_render_frame_host_.get()); | 2282 frame_tree->SwapMainFrame(main_render_frame_host_.get()); |
2282 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { | 2283 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { |
2283 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); | 2284 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); |
2284 } | 2285 } |
2285 } | 2286 } |
2286 | 2287 |
2287 } // namespace content | 2288 } // namespace content |
OLD | NEW |