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

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

Issue 1408743005: Properly recreate swapped out RenderView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix formatting. Created 5 years, 2 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
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 292
293 // The process may (if we're sharing a process with another host that already 293 // The process may (if we're sharing a process with another host that already
294 // initialized it) or may not (we have our own process or the old process 294 // initialized it) or may not (we have our own process or the old process
295 // crashed) have been initialized. Calling Init multiple times will be 295 // crashed) have been initialized. Calling Init multiple times will be
296 // ignored, so this is safe. 296 // ignored, so this is safe.
297 if (!GetProcess()->Init()) 297 if (!GetProcess()->Init())
298 return false; 298 return false;
299 DCHECK(GetProcess()->HasConnection()); 299 DCHECK(GetProcess()->HasConnection());
300 DCHECK(GetProcess()->GetBrowserContext()); 300 DCHECK(GetProcess()->GetBrowserContext());
301 301
302 CHECK(main_frame_routing_id_ != MSG_ROUTING_NONE ||
303 proxy_route_id != MSG_ROUTING_NONE);
304
302 set_renderer_initialized(true); 305 set_renderer_initialized(true);
303 306
304 // Ensure the RenderView starts with a next_page_id larger than any existing 307 // Ensure the RenderView starts with a next_page_id larger than any existing
305 // page ID it might be asked to render. 308 // page ID it might be asked to render.
306 int32 next_page_id = 1; 309 int32 next_page_id = 1;
307 if (max_page_id > -1) 310 if (max_page_id > -1)
308 next_page_id = max_page_id + 1; 311 next_page_id = max_page_id + 1;
309 312
310 ViewMsg_New_Params params; 313 ViewMsg_New_Params params;
311 params.renderer_preferences = 314 params.renderer_preferences =
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after
1463 } else { 1466 } else {
1464 render_view_ready_on_process_launch_ = true; 1467 render_view_ready_on_process_launch_ = true;
1465 } 1468 }
1466 } 1469 }
1467 1470
1468 void RenderViewHostImpl::RenderViewReady() { 1471 void RenderViewHostImpl::RenderViewReady() {
1469 delegate_->RenderViewReady(this); 1472 delegate_->RenderViewReady(this);
1470 } 1473 }
1471 1474
1472 } // namespace content 1475 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698