Chromium Code Reviews| 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 // initialized it) or may not (we have our own process or the old process | 288 // initialized it) or may not (we have our own process or the old process |
| 289 // crashed) have been initialized. Calling Init multiple times will be | 289 // crashed) have been initialized. Calling Init multiple times will be |
| 290 // ignored, so this is safe. | 290 // ignored, so this is safe. |
| 291 if (!GetProcess()->Init()) | 291 if (!GetProcess()->Init()) |
| 292 return false; | 292 return false; |
| 293 DCHECK(GetProcess()->HasConnection()); | 293 DCHECK(GetProcess()->HasConnection()); |
| 294 DCHECK(GetProcess()->GetBrowserContext()); | 294 DCHECK(GetProcess()->GetBrowserContext()); |
| 295 | 295 |
| 296 set_renderer_initialized(true); | 296 set_renderer_initialized(true); |
| 297 | 297 |
| 298 GpuSurfaceTracker::Get()->SetSurfaceHandle( | 298 if (proxy_route_id == MSG_ROUTING_NONE) { |
| 299 surface_id(), GetCompositingSurface()); | 299 GpuSurfaceTracker::Get()->SetSurfaceHandle(surface_id(), |
| 300 GetCompositingSurface()); | |
| 301 } else { | |
| 302 GpuSurfaceTracker::Get()->SetSurfaceHandle( | |
|
Charlie Reis
2015/08/28 18:58:26
Is this case ever reached? I don't see a path whe
lfg
2015/08/28 21:18:40
The only place that can call this function with a
| |
| 303 surface_id(), | |
| 304 gfx::GLSurfaceHandle(gfx::kNullPluginWindow, gfx::NULL_TRANSPORT)); | |
| 305 } | |
| 300 | 306 |
| 301 // 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 |
| 302 // page ID it might be asked to render. | 308 // page ID it might be asked to render. |
| 303 int32 next_page_id = 1; | 309 int32 next_page_id = 1; |
| 304 if (max_page_id > -1) | 310 if (max_page_id > -1) |
| 305 next_page_id = max_page_id + 1; | 311 next_page_id = max_page_id + 1; |
| 306 | 312 |
| 307 ViewMsg_New_Params params; | 313 ViewMsg_New_Params params; |
| 308 params.renderer_preferences = | 314 params.renderer_preferences = |
| 309 delegate_->GetRendererPrefs(GetProcess()->GetBrowserContext()); | 315 delegate_->GetRendererPrefs(GetProcess()->GetBrowserContext()); |
| (...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1429 if (!policy->CanReadFile(GetProcess()->GetID(), file)) | 1435 if (!policy->CanReadFile(GetProcess()->GetID(), file)) |
| 1430 policy->GrantReadFile(GetProcess()->GetID(), file); | 1436 policy->GrantReadFile(GetProcess()->GetID(), file); |
| 1431 } | 1437 } |
| 1432 } | 1438 } |
| 1433 | 1439 |
| 1434 void RenderViewHostImpl::SelectWordAroundCaret() { | 1440 void RenderViewHostImpl::SelectWordAroundCaret() { |
| 1435 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); | 1441 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); |
| 1436 } | 1442 } |
| 1437 | 1443 |
| 1438 } // namespace content | 1444 } // namespace content |
| OLD | NEW |