| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 2950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2961 } | 2961 } |
| 2962 | 2962 |
| 2963 AXTreeIDRegistry::AXTreeID | 2963 AXTreeIDRegistry::AXTreeID |
| 2964 RenderFrameHostImpl::BrowserPluginInstanceIDToAXTreeID( | 2964 RenderFrameHostImpl::BrowserPluginInstanceIDToAXTreeID( |
| 2965 int instance_id) { | 2965 int instance_id) { |
| 2966 RenderFrameHostImpl* guest = static_cast<RenderFrameHostImpl*>( | 2966 RenderFrameHostImpl* guest = static_cast<RenderFrameHostImpl*>( |
| 2967 delegate()->GetGuestByInstanceID(this, instance_id)); | 2967 delegate()->GetGuestByInstanceID(this, instance_id)); |
| 2968 if (!guest) | 2968 if (!guest) |
| 2969 return AXTreeIDRegistry::kNoAXTreeID; | 2969 return AXTreeIDRegistry::kNoAXTreeID; |
| 2970 | 2970 |
| 2971 // Create a mapping from the guest to its embedder's AX Tree ID, and |
| 2972 // explicitly update the guest to propagate that mapping immediately. |
| 2971 guest->set_browser_plugin_embedder_ax_tree_id(GetAXTreeID()); | 2973 guest->set_browser_plugin_embedder_ax_tree_id(GetAXTreeID()); |
| 2974 guest->UpdateAXTreeData(); |
| 2972 | 2975 |
| 2973 return guest->GetAXTreeID(); | 2976 return guest->GetAXTreeID(); |
| 2974 } | 2977 } |
| 2975 | 2978 |
| 2976 void RenderFrameHostImpl::AXContentNodeDataToAXNodeData( | 2979 void RenderFrameHostImpl::AXContentNodeDataToAXNodeData( |
| 2977 const AXContentNodeData& src, | 2980 const AXContentNodeData& src, |
| 2978 ui::AXNodeData* dst) { | 2981 ui::AXNodeData* dst) { |
| 2979 // Copy the common fields. | 2982 // Copy the common fields. |
| 2980 *dst = src; | 2983 *dst = src; |
| 2981 | 2984 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3044 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 3047 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
| 3045 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 3048 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
| 3046 return web_bluetooth_service_.get(); | 3049 return web_bluetooth_service_.get(); |
| 3047 } | 3050 } |
| 3048 | 3051 |
| 3049 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 3052 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
| 3050 web_bluetooth_service_.reset(); | 3053 web_bluetooth_service_.reset(); |
| 3051 } | 3054 } |
| 3052 | 3055 |
| 3053 } // namespace content | 3056 } // namespace content |
| OLD | NEW |