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 2083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2094 // IPC doesn't have the matching token ID, or if we're not waiting on a | 2094 // IPC doesn't have the matching token ID, or if we're not waiting on a |
2095 // reset but this message includes a reset token. | 2095 // reset but this message includes a reset token. |
2096 if (accessibility_reset_token_ != reset_token) { | 2096 if (accessibility_reset_token_ != reset_token) { |
2097 Send(new AccessibilityMsg_Events_ACK(routing_id_, ack_token)); | 2097 Send(new AccessibilityMsg_Events_ACK(routing_id_, ack_token)); |
2098 return; | 2098 return; |
2099 } | 2099 } |
2100 accessibility_reset_token_ = 0; | 2100 accessibility_reset_token_ = 0; |
2101 | 2101 |
2102 RenderWidgetHostViewBase* view = GetViewForAccessibility(); | 2102 RenderWidgetHostViewBase* view = GetViewForAccessibility(); |
2103 | 2103 |
| 2104 if (frame_tree_node_->IsMainFrame() && view) |
| 2105 view->SetMainFrameAXTreeID(GetAXTreeID()); |
| 2106 |
2104 AccessibilityMode accessibility_mode = delegate_->GetAccessibilityMode(); | 2107 AccessibilityMode accessibility_mode = delegate_->GetAccessibilityMode(); |
2105 if (!accessibility_mode.is_mode_off() && view && is_active()) { | 2108 if (!accessibility_mode.is_mode_off() && view && is_active()) { |
2106 if (accessibility_mode.has_mode(AccessibilityMode::kNativeAPIs)) | 2109 if (accessibility_mode.has_mode(AccessibilityMode::kNativeAPIs)) |
2107 GetOrCreateBrowserAccessibilityManager(); | 2110 GetOrCreateBrowserAccessibilityManager(); |
2108 | 2111 |
2109 std::vector<AXEventNotificationDetails> details; | 2112 std::vector<AXEventNotificationDetails> details; |
2110 details.reserve(params.size()); | 2113 details.reserve(params.size()); |
2111 for (size_t i = 0; i < params.size(); ++i) { | 2114 for (size_t i = 0; i < params.size(); ++i) { |
2112 const AccessibilityHostMsg_EventParams& param = params[i]; | 2115 const AccessibilityHostMsg_EventParams& param = params[i]; |
2113 AXEventNotificationDetails detail; | 2116 AXEventNotificationDetails detail; |
(...skipping 1520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3634 service_manager::mojom::InterfaceProviderPtr provider; | 3637 service_manager::mojom::InterfaceProviderPtr provider; |
3635 BindInterfaceRegistryForRenderFrameHost(mojo::MakeRequest(&provider), this); | 3638 BindInterfaceRegistryForRenderFrameHost(mojo::MakeRequest(&provider), this); |
3636 java_interfaces_.reset(new service_manager::InterfaceProvider); | 3639 java_interfaces_.reset(new service_manager::InterfaceProvider); |
3637 java_interfaces_->Bind(std::move(provider)); | 3640 java_interfaces_->Bind(std::move(provider)); |
3638 } | 3641 } |
3639 return java_interfaces_.get(); | 3642 return java_interfaces_.get(); |
3640 } | 3643 } |
3641 #endif | 3644 #endif |
3642 | 3645 |
3643 } // namespace content | 3646 } // namespace content |
OLD | NEW |