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 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1567 void RenderFrameHostImpl::UpdateCrossProcessIframeAccessibility( | 1567 void RenderFrameHostImpl::UpdateCrossProcessIframeAccessibility( |
1568 const std::map<int32, int>& node_to_frame_routing_id_map) { | 1568 const std::map<int32, int>& node_to_frame_routing_id_map) { |
1569 for (const auto& iter : node_to_frame_routing_id_map) { | 1569 for (const auto& iter : node_to_frame_routing_id_map) { |
1570 // This is the id of the accessibility node that has a child frame. | 1570 // This is the id of the accessibility node that has a child frame. |
1571 int32 node_id = iter.first; | 1571 int32 node_id = iter.first; |
1572 // The routing id from either a RenderFrame or a RenderFrameProxy. | 1572 // The routing id from either a RenderFrame or a RenderFrameProxy. |
1573 int frame_routing_id = iter.second; | 1573 int frame_routing_id = iter.second; |
1574 | 1574 |
1575 FrameTree* frame_tree = frame_tree_node()->frame_tree(); | 1575 FrameTree* frame_tree = frame_tree_node()->frame_tree(); |
1576 FrameTreeNode* child_frame_tree_node = frame_tree->FindByRoutingID( | 1576 FrameTreeNode* child_frame_tree_node = frame_tree->FindByRoutingID( |
1577 GetProcess()->GetID(), frame_routing_id); | 1577 frame_routing_id, GetProcess()->GetID()); |
dmazzoni
2015/01/28 19:29:00
Holy cow, the parameters were reversed!
It's a *t
nasko
2015/02/03 17:08:18
Also makes me think if we should change the signat
| |
1578 | |
1578 if (child_frame_tree_node) { | 1579 if (child_frame_tree_node) { |
1579 FrameAccessibility::GetInstance()->AddChildFrame( | 1580 FrameAccessibility::GetInstance()->AddChildFrame( |
1580 this, node_id, child_frame_tree_node->frame_tree_node_id()); | 1581 this, node_id, child_frame_tree_node->frame_tree_node_id()); |
1581 } | 1582 } |
1582 } | 1583 } |
1583 } | 1584 } |
1584 | 1585 |
1585 void RenderFrameHostImpl::UpdateGuestFrameAccessibility( | 1586 void RenderFrameHostImpl::UpdateGuestFrameAccessibility( |
1586 const std::map<int32, int>& node_to_browser_plugin_instance_id_map) { | 1587 const std::map<int32, int>& node_to_browser_plugin_instance_id_map) { |
1587 for (const auto& iter : node_to_browser_plugin_instance_id_map) { | 1588 for (const auto& iter : node_to_browser_plugin_instance_id_map) { |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1735 void RenderFrameHostImpl::DidUseGeolocationPermission() { | 1736 void RenderFrameHostImpl::DidUseGeolocationPermission() { |
1736 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); | 1737 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); |
1737 GetContentClient()->browser()->RegisterPermissionUsage( | 1738 GetContentClient()->browser()->RegisterPermissionUsage( |
1738 PERMISSION_GEOLOCATION, | 1739 PERMISSION_GEOLOCATION, |
1739 delegate_->GetAsWebContents(), | 1740 delegate_->GetAsWebContents(), |
1740 GetLastCommittedURL().GetOrigin(), | 1741 GetLastCommittedURL().GetOrigin(), |
1741 top_frame->GetLastCommittedURL().GetOrigin()); | 1742 top_frame->GetLastCommittedURL().GetOrigin()); |
1742 } | 1743 } |
1743 | 1744 |
1744 } // namespace content | 1745 } // namespace content |
OLD | NEW |