| 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 1592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1603 void RenderFrameHostImpl::UpdateCrossProcessIframeAccessibility( | 1603 void RenderFrameHostImpl::UpdateCrossProcessIframeAccessibility( |
| 1604 const std::map<int32, int>& node_to_frame_routing_id_map) { | 1604 const std::map<int32, int>& node_to_frame_routing_id_map) { |
| 1605 for (const auto& iter : node_to_frame_routing_id_map) { | 1605 for (const auto& iter : node_to_frame_routing_id_map) { |
| 1606 // This is the id of the accessibility node that has a child frame. | 1606 // This is the id of the accessibility node that has a child frame. |
| 1607 int32 node_id = iter.first; | 1607 int32 node_id = iter.first; |
| 1608 // The routing id from either a RenderFrame or a RenderFrameProxy. | 1608 // The routing id from either a RenderFrame or a RenderFrameProxy. |
| 1609 int frame_routing_id = iter.second; | 1609 int frame_routing_id = iter.second; |
| 1610 | 1610 |
| 1611 FrameTree* frame_tree = frame_tree_node()->frame_tree(); | 1611 FrameTree* frame_tree = frame_tree_node()->frame_tree(); |
| 1612 FrameTreeNode* child_frame_tree_node = frame_tree->FindByRoutingID( | 1612 FrameTreeNode* child_frame_tree_node = frame_tree->FindByRoutingID( |
| 1613 GetProcess()->GetID(), frame_routing_id); | 1613 frame_routing_id, GetProcess()->GetID()); |
| 1614 |
| 1614 if (child_frame_tree_node) { | 1615 if (child_frame_tree_node) { |
| 1615 FrameAccessibility::GetInstance()->AddChildFrame( | 1616 FrameAccessibility::GetInstance()->AddChildFrame( |
| 1616 this, node_id, child_frame_tree_node->frame_tree_node_id()); | 1617 this, node_id, child_frame_tree_node->frame_tree_node_id()); |
| 1617 } | 1618 } |
| 1618 } | 1619 } |
| 1619 } | 1620 } |
| 1620 | 1621 |
| 1621 void RenderFrameHostImpl::UpdateGuestFrameAccessibility( | 1622 void RenderFrameHostImpl::UpdateGuestFrameAccessibility( |
| 1622 const std::map<int32, int>& node_to_browser_plugin_instance_id_map) { | 1623 const std::map<int32, int>& node_to_browser_plugin_instance_id_map) { |
| 1623 for (const auto& iter : node_to_browser_plugin_instance_id_map) { | 1624 for (const auto& iter : node_to_browser_plugin_instance_id_map) { |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1771 void RenderFrameHostImpl::DidUseGeolocationPermission() { | 1772 void RenderFrameHostImpl::DidUseGeolocationPermission() { |
| 1772 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); | 1773 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); |
| 1773 GetContentClient()->browser()->RegisterPermissionUsage( | 1774 GetContentClient()->browser()->RegisterPermissionUsage( |
| 1774 PERMISSION_GEOLOCATION, | 1775 PERMISSION_GEOLOCATION, |
| 1775 delegate_->GetAsWebContents(), | 1776 delegate_->GetAsWebContents(), |
| 1776 GetLastCommittedURL().GetOrigin(), | 1777 GetLastCommittedURL().GetOrigin(), |
| 1777 top_frame->GetLastCommittedURL().GetOrigin()); | 1778 top_frame->GetLastCommittedURL().GetOrigin()); |
| 1778 } | 1779 } |
| 1779 | 1780 |
| 1780 } // namespace content | 1781 } // namespace content |
| OLD | NEW |