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/31 19:02:51
Please leave a comment so others will understand w
lfg
2015/09/02 00:32:17
Done.
| |
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 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1424 if (!policy->CanReadFile(GetProcess()->GetID(), file)) | 1430 if (!policy->CanReadFile(GetProcess()->GetID(), file)) |
1425 policy->GrantReadFile(GetProcess()->GetID(), file); | 1431 policy->GrantReadFile(GetProcess()->GetID(), file); |
1426 } | 1432 } |
1427 } | 1433 } |
1428 | 1434 |
1429 void RenderViewHostImpl::SelectWordAroundCaret() { | 1435 void RenderViewHostImpl::SelectWordAroundCaret() { |
1430 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); | 1436 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); |
1431 } | 1437 } |
1432 | 1438 |
1433 } // namespace content | 1439 } // namespace content |
OLD | NEW |