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 <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 2102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2113 // Don't process this IPC if either we're waiting on a reset and this | 2113 // Don't process this IPC if either we're waiting on a reset and this |
2114 // IPC doesn't have the matching token ID, or if we're not waiting on a | 2114 // IPC doesn't have the matching token ID, or if we're not waiting on a |
2115 // reset but this message includes a reset token. | 2115 // reset but this message includes a reset token. |
2116 if (accessibility_reset_token_ != reset_token) { | 2116 if (accessibility_reset_token_ != reset_token) { |
2117 Send(new AccessibilityMsg_Events_ACK(routing_id_, ack_token)); | 2117 Send(new AccessibilityMsg_Events_ACK(routing_id_, ack_token)); |
2118 return; | 2118 return; |
2119 } | 2119 } |
2120 accessibility_reset_token_ = 0; | 2120 accessibility_reset_token_ = 0; |
2121 | 2121 |
2122 RenderWidgetHostViewBase* view = GetViewForAccessibility(); | 2122 RenderWidgetHostViewBase* view = GetViewForAccessibility(); |
2123 | |
2124 if (frame_tree_node_->IsMainFrame() && view) | |
2125 view->SetMainFrameAXTreeID(GetAXTreeID()); | |
2126 | |
2127 AccessibilityMode accessibility_mode = delegate_->GetAccessibilityMode(); | 2123 AccessibilityMode accessibility_mode = delegate_->GetAccessibilityMode(); |
2128 if (!accessibility_mode.is_mode_off() && view && is_active()) { | 2124 if (!accessibility_mode.is_mode_off() && view && is_active()) { |
2129 if (accessibility_mode.has_mode(AccessibilityMode::kNativeAPIs)) | 2125 if (accessibility_mode.has_mode(AccessibilityMode::kNativeAPIs)) |
2130 GetOrCreateBrowserAccessibilityManager(); | 2126 GetOrCreateBrowserAccessibilityManager(); |
2131 | 2127 |
2132 std::vector<AXEventNotificationDetails> details; | 2128 std::vector<AXEventNotificationDetails> details; |
2133 details.reserve(params.size()); | 2129 details.reserve(params.size()); |
2134 for (size_t i = 0; i < params.size(); ++i) { | 2130 for (size_t i = 0; i < params.size(); ++i) { |
2135 const AccessibilityHostMsg_EventParams& param = params[i]; | 2131 const AccessibilityHostMsg_EventParams& param = params[i]; |
2136 AXEventNotificationDetails detail; | 2132 AXEventNotificationDetails detail; |
(...skipping 1649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3786 } | 3782 } |
3787 | 3783 |
3788 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame( | 3784 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame( |
3789 const std::string& interface_name, | 3785 const std::string& interface_name, |
3790 mojo::ScopedMessagePipeHandle pipe) { | 3786 mojo::ScopedMessagePipeHandle pipe) { |
3791 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe)); | 3787 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe)); |
3792 } | 3788 } |
3793 #endif | 3789 #endif |
3794 | 3790 |
3795 } // namespace content | 3791 } // namespace content |
OLD | NEW |