| 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 3311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3322 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); | 3322 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); |
| 3323 | 3323 |
| 3324 if (browser_plugin_embedder_ax_tree_id_ != AXTreeIDRegistry::kNoAXTreeID) | 3324 if (browser_plugin_embedder_ax_tree_id_ != AXTreeIDRegistry::kNoAXTreeID) |
| 3325 dst->parent_tree_id = browser_plugin_embedder_ax_tree_id_; | 3325 dst->parent_tree_id = browser_plugin_embedder_ax_tree_id_; |
| 3326 | 3326 |
| 3327 // If this is not the root frame tree node, we're done. | 3327 // If this is not the root frame tree node, we're done. |
| 3328 if (frame_tree_node()->parent()) | 3328 if (frame_tree_node()->parent()) |
| 3329 return; | 3329 return; |
| 3330 | 3330 |
| 3331 // For the root frame tree node, also store the AXTreeID of the focused frame. | 3331 // For the root frame tree node, also store the AXTreeID of the focused frame. |
| 3332 // TODO(avallee): https://crbug.com/610795: No focus ax events. | 3332 auto* focused_frame = static_cast<RenderFrameHostImpl*>( |
| 3333 // This is probably where we need to fix the bug to enable the test. | 3333 delegate_->GetFocusedFrameIncludingInnerWebContents()); |
| 3334 FrameTreeNode* focused_frame_tree_node = frame_tree_->GetFocusedFrame(); | 3334 if (!focused_frame) |
| 3335 if (!focused_frame_tree_node) | |
| 3336 return; | 3335 return; |
| 3337 RenderFrameHostImpl* focused_frame = | |
| 3338 focused_frame_tree_node->current_frame_host(); | |
| 3339 DCHECK(focused_frame); | |
| 3340 dst->focused_tree_id = focused_frame->GetAXTreeID(); | 3336 dst->focused_tree_id = focused_frame->GetAXTreeID(); |
| 3341 } | 3337 } |
| 3342 | 3338 |
| 3343 WebBluetoothServiceImpl* RenderFrameHostImpl::CreateWebBluetoothService( | 3339 WebBluetoothServiceImpl* RenderFrameHostImpl::CreateWebBluetoothService( |
| 3344 blink::mojom::WebBluetoothServiceRequest request) { | 3340 blink::mojom::WebBluetoothServiceRequest request) { |
| 3345 // RFHI owns |web_bluetooth_services_| and |web_bluetooth_service| owns the | 3341 // RFHI owns |web_bluetooth_services_| and |web_bluetooth_service| owns the |
| 3346 // |binding_| which may run the error handler. |binding_| can't run the error | 3342 // |binding_| which may run the error handler. |binding_| can't run the error |
| 3347 // handler after it's destroyed so it can't run after the RFHI is destroyed. | 3343 // handler after it's destroyed so it can't run after the RFHI is destroyed. |
| 3348 auto web_bluetooth_service = | 3344 auto web_bluetooth_service = |
| 3349 base::MakeUnique<WebBluetoothServiceImpl>(this, std::move(request)); | 3345 base::MakeUnique<WebBluetoothServiceImpl>(this, std::move(request)); |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3479 // There is no pending NavigationEntry in these cases, so pass 0 as the | 3475 // There is no pending NavigationEntry in these cases, so pass 0 as the |
| 3480 // pending_nav_entry_id. If the previous handle was a prematurely aborted | 3476 // pending_nav_entry_id. If the previous handle was a prematurely aborted |
| 3481 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. | 3477 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. |
| 3482 return NavigationHandleImpl::Create( | 3478 return NavigationHandleImpl::Create( |
| 3483 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, | 3479 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, |
| 3484 params.was_within_same_page, base::TimeTicks::Now(), | 3480 params.was_within_same_page, base::TimeTicks::Now(), |
| 3485 entry_id_for_data_nav, false); // started_from_context_menu | 3481 entry_id_for_data_nav, false); // started_from_context_menu |
| 3486 } | 3482 } |
| 3487 | 3483 |
| 3488 } // namespace content | 3484 } // namespace content |
| OLD | NEW |