OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/frame_host/render_frame_host_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 } | 544 } |
545 | 545 |
546 BrowserAccessibilityManager* manager = | 546 BrowserAccessibilityManager* manager = |
547 parent_frame->browser_accessibility_manager(); | 547 parent_frame->browser_accessibility_manager(); |
548 if (!manager) | 548 if (!manager) |
549 return NULL; | 549 return NULL; |
550 | 550 |
551 return manager->GetFromID(parent_node_id); | 551 return manager->GetFromID(parent_node_id); |
552 } | 552 } |
553 | 553 |
554 bool RenderFrameHostImpl::CreateRenderFrame(int parent_routing_id) { | 554 bool RenderFrameHostImpl::CreateRenderFrame(int parent_routing_id, |
| 555 int proxy_routing_id) { |
555 TRACE_EVENT0("navigation", "RenderFrameHostImpl::CreateRenderFrame"); | 556 TRACE_EVENT0("navigation", "RenderFrameHostImpl::CreateRenderFrame"); |
556 DCHECK(!IsRenderFrameLive()) << "Creating frame twice"; | 557 DCHECK(!IsRenderFrameLive()) << "Creating frame twice"; |
557 | 558 |
558 // The process may (if we're sharing a process with another host that already | 559 // The process may (if we're sharing a process with another host that already |
559 // initialized it) or may not (we have our own process or the old process | 560 // initialized it) or may not (we have our own process or the old process |
560 // crashed) have been initialized. Calling Init multiple times will be | 561 // crashed) have been initialized. Calling Init multiple times will be |
561 // ignored, so this is safe. | 562 // ignored, so this is safe. |
562 if (!GetProcess()->Init()) | 563 if (!GetProcess()->Init()) |
563 return false; | 564 return false; |
564 | 565 |
565 DCHECK(GetProcess()->HasConnection()); | 566 DCHECK(GetProcess()->HasConnection()); |
566 | 567 |
567 Send(new FrameMsg_NewFrame(routing_id_, parent_routing_id)); | 568 Send(new FrameMsg_NewFrame(routing_id_, parent_routing_id, proxy_routing_id)); |
568 | 569 |
569 // The renderer now has a RenderFrame for this RenderFrameHost. Note that | 570 // The renderer now has a RenderFrame for this RenderFrameHost. Note that |
570 // this path is only used for out-of-process iframes. Main frame RenderFrames | 571 // this path is only used for out-of-process iframes. Main frame RenderFrames |
571 // are created with their RenderView, and same-site iframes are created at the | 572 // are created with their RenderView, and same-site iframes are created at the |
572 // time of OnCreateChildFrame. | 573 // time of OnCreateChildFrame. |
573 set_render_frame_created(true); | 574 set_render_frame_created(true); |
574 | 575 |
575 return true; | 576 return true; |
576 } | 577 } |
577 | 578 |
(...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1658 void RenderFrameHostImpl::DidUseGeolocationPermission() { | 1659 void RenderFrameHostImpl::DidUseGeolocationPermission() { |
1659 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); | 1660 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); |
1660 GetContentClient()->browser()->RegisterPermissionUsage( | 1661 GetContentClient()->browser()->RegisterPermissionUsage( |
1661 PERMISSION_GEOLOCATION, | 1662 PERMISSION_GEOLOCATION, |
1662 delegate_->GetAsWebContents(), | 1663 delegate_->GetAsWebContents(), |
1663 GetLastCommittedURL().GetOrigin(), | 1664 GetLastCommittedURL().GetOrigin(), |
1664 top_frame->GetLastCommittedURL().GetOrigin()); | 1665 top_frame->GetLastCommittedURL().GetOrigin()); |
1665 } | 1666 } |
1666 | 1667 |
1667 } // namespace content | 1668 } // namespace content |
OLD | NEW |