Chromium Code Reviews| 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 3312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3323 // If this is not the root frame tree node, we're done. | 3323 // If this is not the root frame tree node, we're done. |
| 3324 if (frame_tree_node()->parent()) | 3324 if (frame_tree_node()->parent()) |
| 3325 return; | 3325 return; |
| 3326 | 3326 |
| 3327 // For the root frame tree node, also store the AXTreeID of the focused frame. | 3327 // For the root frame tree node, also store the AXTreeID of the focused frame. |
| 3328 // TODO(avallee): https://crbug.com/610795: No focus ax events. | 3328 // TODO(avallee): https://crbug.com/610795: No focus ax events. |
| 3329 // This is probably where we need to fix the bug to enable the test. | 3329 // This is probably where we need to fix the bug to enable the test. |
| 3330 FrameTreeNode* focused_frame_tree_node = frame_tree_->GetFocusedFrame(); | 3330 FrameTreeNode* focused_frame_tree_node = frame_tree_->GetFocusedFrame(); |
| 3331 if (!focused_frame_tree_node) | 3331 if (!focused_frame_tree_node) |
| 3332 return; | 3332 return; |
| 3333 RenderFrameHostImpl* focused_frame = | 3333 |
| 3334 focused_frame_tree_node->current_frame_host(); | 3334 auto* focused_frame = static_cast<RenderFrameHostImpl*>( |
| 3335 delegate_->GetFrameAtNode(focused_frame_tree_node)); | |
|
dmazzoni
2017/02/16 00:19:02
Maybe it'd be cleaner if you called it GetFocusedF
avallee
2017/02/21 20:00:31
Reworked to just navigate down the WebContents tre
| |
| 3335 DCHECK(focused_frame); | 3336 DCHECK(focused_frame); |
| 3336 dst->focused_tree_id = focused_frame->GetAXTreeID(); | 3337 dst->focused_tree_id = focused_frame->GetAXTreeID(); |
| 3337 } | 3338 } |
| 3338 | 3339 |
| 3339 WebBluetoothServiceImpl* RenderFrameHostImpl::CreateWebBluetoothService( | 3340 WebBluetoothServiceImpl* RenderFrameHostImpl::CreateWebBluetoothService( |
| 3340 blink::mojom::WebBluetoothServiceRequest request) { | 3341 blink::mojom::WebBluetoothServiceRequest request) { |
| 3341 // RFHI owns |web_bluetooth_services_| and |web_bluetooth_service| owns the | 3342 // RFHI owns |web_bluetooth_services_| and |web_bluetooth_service| owns the |
| 3342 // |binding_| which may run the error handler. |binding_| can't run the error | 3343 // |binding_| which may run the error handler. |binding_| can't run the error |
| 3343 // handler after it's destroyed so it can't run after the RFHI is destroyed. | 3344 // handler after it's destroyed so it can't run after the RFHI is destroyed. |
| 3344 auto web_bluetooth_service = | 3345 auto web_bluetooth_service = |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3455 // There is no pending NavigationEntry in these cases, so pass 0 as the | 3456 // There is no pending NavigationEntry in these cases, so pass 0 as the |
| 3456 // pending_nav_entry_id. If the previous handle was a prematurely aborted | 3457 // pending_nav_entry_id. If the previous handle was a prematurely aborted |
| 3457 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. | 3458 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. |
| 3458 return NavigationHandleImpl::Create( | 3459 return NavigationHandleImpl::Create( |
| 3459 params.url, frame_tree_node_, is_renderer_initiated, | 3460 params.url, frame_tree_node_, is_renderer_initiated, |
| 3460 params.was_within_same_page, base::TimeTicks::Now(), | 3461 params.was_within_same_page, base::TimeTicks::Now(), |
| 3461 entry_id_for_data_nav, false); // started_from_context_menu | 3462 entry_id_for_data_nav, false); // started_from_context_menu |
| 3462 } | 3463 } |
| 3463 | 3464 |
| 3464 } // namespace content | 3465 } // namespace content |
| OLD | NEW |