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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 if (!is_active_) { | 329 if (!is_active_) { |
330 params.replicated_frame_state = | 330 params.replicated_frame_state = |
331 static_cast<RenderFrameHostImpl*>(GetMainFrame())->frame_tree_node() | 331 static_cast<RenderFrameHostImpl*>(GetMainFrame())->frame_tree_node() |
332 ->current_replication_state(); | 332 ->current_replication_state(); |
333 } | 333 } |
334 | 334 |
335 if (!Send(new ViewMsg_New(params))) | 335 if (!Send(new ViewMsg_New(params))) |
336 return false; | 336 return false; |
337 SetInitialRenderSizeParams(params.initial_size); | 337 SetInitialRenderSizeParams(params.initial_size); |
338 | 338 |
| 339 // If the RWHV has not yet been set, the surface ID namespace will get |
| 340 // passed down by the call to SetView(). |
| 341 if (view_) { |
| 342 Send(new ViewMsg_SetSurfaceIdNamespace(GetRoutingID(), |
| 343 view_->GetSurfaceIdNamespace())); |
| 344 } |
| 345 |
339 // If it's enabled, tell the renderer to set up the Javascript bindings for | 346 // If it's enabled, tell the renderer to set up the Javascript bindings for |
340 // sending messages back to the browser. | 347 // sending messages back to the browser. |
341 if (GetProcess()->IsIsolatedGuest()) | 348 if (GetProcess()->IsIsolatedGuest()) |
342 DCHECK_EQ(0, enabled_bindings_); | 349 DCHECK_EQ(0, enabled_bindings_); |
343 Send(new ViewMsg_AllowBindings(GetRoutingID(), enabled_bindings_)); | 350 Send(new ViewMsg_AllowBindings(GetRoutingID(), enabled_bindings_)); |
344 // Let our delegate know that we created a RenderView. | 351 // Let our delegate know that we created a RenderView. |
345 delegate_->RenderViewCreated(this); | 352 delegate_->RenderViewCreated(this); |
346 | 353 |
347 // Since this method creates the main RenderFrame in the renderer process, | 354 // Since this method creates the main RenderFrame in the renderer process, |
348 // set the proper state on its corresponding RenderFrameHost. | 355 // set the proper state on its corresponding RenderFrameHost. |
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1417 if (!policy->CanReadFile(GetProcess()->GetID(), file)) | 1424 if (!policy->CanReadFile(GetProcess()->GetID(), file)) |
1418 policy->GrantReadFile(GetProcess()->GetID(), file); | 1425 policy->GrantReadFile(GetProcess()->GetID(), file); |
1419 } | 1426 } |
1420 } | 1427 } |
1421 | 1428 |
1422 void RenderViewHostImpl::SelectWordAroundCaret() { | 1429 void RenderViewHostImpl::SelectWordAroundCaret() { |
1423 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); | 1430 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); |
1424 } | 1431 } |
1425 | 1432 |
1426 } // namespace content | 1433 } // namespace content |
OLD | NEW |