| 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 DCHECK(!IsRenderViewLive()) << "Creating view twice"; | 288 DCHECK(!IsRenderViewLive()) << "Creating view twice"; |
| 289 | 289 |
| 290 // The process may (if we're sharing a process with another host that already | 290 // The process may (if we're sharing a process with another host that already |
| 291 // initialized it) or may not (we have our own process or the old process | 291 // initialized it) or may not (we have our own process or the old process |
| 292 // crashed) have been initialized. Calling Init multiple times will be | 292 // crashed) have been initialized. Calling Init multiple times will be |
| 293 // ignored, so this is safe. | 293 // ignored, so this is safe. |
| 294 if (!GetProcess()->Init()) | 294 if (!GetProcess()->Init()) |
| 295 return false; | 295 return false; |
| 296 DCHECK(GetProcess()->HasConnection()); | 296 DCHECK(GetProcess()->HasConnection()); |
| 297 DCHECK(GetProcess()->GetBrowserContext()); | 297 DCHECK(GetProcess()->GetBrowserContext()); |
| 298 CHECK(main_frame_routing_id_ != MSG_ROUTING_NONE || |
| 299 proxy_route_id != MSG_ROUTING_NONE); |
| 298 | 300 |
| 299 GetWidget()->set_renderer_initialized(true); | 301 GetWidget()->set_renderer_initialized(true); |
| 300 | 302 |
| 301 // Ensure the RenderView starts with a next_page_id larger than any existing | 303 // Ensure the RenderView starts with a next_page_id larger than any existing |
| 302 // page ID it might be asked to render. | 304 // page ID it might be asked to render. |
| 303 int32 next_page_id = 1; | 305 int32 next_page_id = 1; |
| 304 if (max_page_id > -1) | 306 if (max_page_id > -1) |
| 305 next_page_id = max_page_id + 1; | 307 next_page_id = max_page_id + 1; |
| 306 | 308 |
| 307 ViewMsg_New_Params params; | 309 ViewMsg_New_Params params; |
| (...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1460 } else { | 1462 } else { |
| 1461 render_view_ready_on_process_launch_ = true; | 1463 render_view_ready_on_process_launch_ = true; |
| 1462 } | 1464 } |
| 1463 } | 1465 } |
| 1464 | 1466 |
| 1465 void RenderViewHostImpl::RenderViewReady() { | 1467 void RenderViewHostImpl::RenderViewReady() { |
| 1466 delegate_->RenderViewReady(this); | 1468 delegate_->RenderViewReady(this); |
| 1467 } | 1469 } |
| 1468 | 1470 |
| 1469 } // namespace content | 1471 } // namespace content |
| OLD | NEW |