Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 281663002: Create RenderFrameProxyHost at time of swap-out instead of commit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix IPC_BEGIN_MESSAGE_MAP macro, as _EX version doesn't exist anymore. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 return delegate_; 256 return delegate_;
257 } 257 }
258 258
259 SiteInstance* RenderViewHostImpl::GetSiteInstance() const { 259 SiteInstance* RenderViewHostImpl::GetSiteInstance() const {
260 return instance_.get(); 260 return instance_.get();
261 } 261 }
262 262
263 bool RenderViewHostImpl::CreateRenderView( 263 bool RenderViewHostImpl::CreateRenderView(
264 const base::string16& frame_name, 264 const base::string16& frame_name,
265 int opener_route_id, 265 int opener_route_id,
266 int proxy_route_id,
266 int32 max_page_id, 267 int32 max_page_id,
267 bool window_was_created_with_opener) { 268 bool window_was_created_with_opener) {
268 TRACE_EVENT0("renderer_host", "RenderViewHostImpl::CreateRenderView"); 269 TRACE_EVENT0("renderer_host", "RenderViewHostImpl::CreateRenderView");
269 DCHECK(!IsRenderViewLive()) << "Creating view twice"; 270 DCHECK(!IsRenderViewLive()) << "Creating view twice";
270 271
271 // The process may (if we're sharing a process with another host that already 272 // The process may (if we're sharing a process with another host that already
272 // initialized it) or may not (we have our own process or the old process 273 // initialized it) or may not (we have our own process or the old process
273 // crashed) have been initialized. Calling Init multiple times will be 274 // crashed) have been initialized. Calling Init multiple times will be
274 // ignored, so this is safe. 275 // ignored, so this is safe.
275 if (!GetProcess()->Init()) 276 if (!GetProcess()->Init())
(...skipping 18 matching lines...) Expand all
294 params.web_preferences = delegate_->GetWebkitPrefs(); 295 params.web_preferences = delegate_->GetWebkitPrefs();
295 params.view_id = GetRoutingID(); 296 params.view_id = GetRoutingID();
296 params.main_frame_routing_id = main_frame_routing_id_; 297 params.main_frame_routing_id = main_frame_routing_id_;
297 params.surface_id = surface_id(); 298 params.surface_id = surface_id();
298 params.session_storage_namespace_id = 299 params.session_storage_namespace_id =
299 delegate_->GetSessionStorageNamespace(instance_)->id(); 300 delegate_->GetSessionStorageNamespace(instance_)->id();
300 params.frame_name = frame_name; 301 params.frame_name = frame_name;
301 // Ensure the RenderView sets its opener correctly. 302 // Ensure the RenderView sets its opener correctly.
302 params.opener_route_id = opener_route_id; 303 params.opener_route_id = opener_route_id;
303 params.swapped_out = !IsRVHStateActive(rvh_state_); 304 params.swapped_out = !IsRVHStateActive(rvh_state_);
305 params.proxy_routing_id = proxy_route_id;
304 params.hidden = is_hidden(); 306 params.hidden = is_hidden();
305 params.never_visible = delegate_->IsNeverVisible(); 307 params.never_visible = delegate_->IsNeverVisible();
306 params.window_was_created_with_opener = window_was_created_with_opener; 308 params.window_was_created_with_opener = window_was_created_with_opener;
307 params.next_page_id = next_page_id; 309 params.next_page_id = next_page_id;
308 GetWebScreenInfo(&params.screen_info); 310 GetWebScreenInfo(&params.screen_info);
309 params.accessibility_mode = accessibility_mode(); 311 params.accessibility_mode = accessibility_mode();
310 312
311 Send(new ViewMsg_New(params)); 313 Send(new ViewMsg_New(params));
312 314
313 // If it's enabled, tell the renderer to set up the Javascript bindings for 315 // If it's enabled, tell the renderer to set up the Javascript bindings for
(...skipping 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after
1689 FrameTree* frame_tree = delegate_->GetFrameTree(); 1691 FrameTree* frame_tree = delegate_->GetFrameTree();
1690 1692
1691 frame_tree->ResetForMainFrameSwap(); 1693 frame_tree->ResetForMainFrameSwap();
1692 } 1694 }
1693 1695
1694 void RenderViewHostImpl::SelectWordAroundCaret() { 1696 void RenderViewHostImpl::SelectWordAroundCaret() {
1695 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); 1697 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID()));
1696 } 1698 }
1697 1699
1698 } // namespace content 1700 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698