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 1696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1707 void RenderFrameHostImpl::UpdateCrossProcessIframeAccessibility( | 1707 void RenderFrameHostImpl::UpdateCrossProcessIframeAccessibility( |
1708 const std::map<int32, int>& node_to_frame_routing_id_map) { | 1708 const std::map<int32, int>& node_to_frame_routing_id_map) { |
1709 for (const auto& iter : node_to_frame_routing_id_map) { | 1709 for (const auto& iter : node_to_frame_routing_id_map) { |
1710 // This is the id of the accessibility node that has a child frame. | 1710 // This is the id of the accessibility node that has a child frame. |
1711 int32 node_id = iter.first; | 1711 int32 node_id = iter.first; |
1712 // The routing id from either a RenderFrame or a RenderFrameProxy. | 1712 // The routing id from either a RenderFrame or a RenderFrameProxy. |
1713 int frame_routing_id = iter.second; | 1713 int frame_routing_id = iter.second; |
1714 | 1714 |
1715 FrameTree* frame_tree = frame_tree_node()->frame_tree(); | 1715 FrameTree* frame_tree = frame_tree_node()->frame_tree(); |
1716 FrameTreeNode* child_frame_tree_node = frame_tree->FindByRoutingID( | 1716 FrameTreeNode* child_frame_tree_node = frame_tree->FindByRoutingID( |
1717 frame_routing_id, GetProcess()->GetID()); | 1717 GetProcess()->GetID(), frame_routing_id); |
1718 | 1718 |
1719 if (child_frame_tree_node) { | 1719 if (child_frame_tree_node) { |
1720 FrameAccessibility::GetInstance()->AddChildFrame( | 1720 FrameAccessibility::GetInstance()->AddChildFrame( |
1721 this, node_id, child_frame_tree_node->frame_tree_node_id()); | 1721 this, node_id, child_frame_tree_node->frame_tree_node_id()); |
1722 } | 1722 } |
1723 } | 1723 } |
1724 } | 1724 } |
1725 | 1725 |
1726 void RenderFrameHostImpl::UpdateGuestFrameAccessibility( | 1726 void RenderFrameHostImpl::UpdateGuestFrameAccessibility( |
1727 const std::map<int32, int>& node_to_browser_plugin_instance_id_map) { | 1727 const std::map<int32, int>& node_to_browser_plugin_instance_id_map) { |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1884 void RenderFrameHostImpl::DidUseGeolocationPermission() { | 1884 void RenderFrameHostImpl::DidUseGeolocationPermission() { |
1885 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); | 1885 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); |
1886 GetContentClient()->browser()->RegisterPermissionUsage( | 1886 GetContentClient()->browser()->RegisterPermissionUsage( |
1887 PERMISSION_GEOLOCATION, | 1887 PERMISSION_GEOLOCATION, |
1888 delegate_->GetAsWebContents(), | 1888 delegate_->GetAsWebContents(), |
1889 GetLastCommittedURL().GetOrigin(), | 1889 GetLastCommittedURL().GetOrigin(), |
1890 top_frame->GetLastCommittedURL().GetOrigin()); | 1890 top_frame->GetLastCommittedURL().GetOrigin()); |
1891 } | 1891 } |
1892 | 1892 |
1893 } // namespace content | 1893 } // namespace content |
OLD | NEW |