Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(842)

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2474323002: Implement WebContentsViewChildFrame::TakeFocus. (Closed)
Patch Set: Fix cases where focus does not actually advance focus Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2514 matching lines...) Expand 10 before | Expand all | Expand 10 after
2525 2525
2526 int opener_routing_id = 2526 int opener_routing_id =
2527 frame_tree_node_->render_manager()->GetOpenerRoutingID(GetSiteInstance()); 2527 frame_tree_node_->render_manager()->GetOpenerRoutingID(GetSiteInstance());
2528 Send(new FrameMsg_UpdateOpener(GetRoutingID(), opener_routing_id)); 2528 Send(new FrameMsg_UpdateOpener(GetRoutingID(), opener_routing_id));
2529 } 2529 }
2530 2530
2531 void RenderFrameHostImpl::SetFocusedFrame() { 2531 void RenderFrameHostImpl::SetFocusedFrame() {
2532 Send(new FrameMsg_SetFocusedFrame(routing_id_)); 2532 Send(new FrameMsg_SetFocusedFrame(routing_id_));
2533 } 2533 }
2534 2534
2535 void RenderFrameHostImpl::AdvanceFocus(blink::WebFocusType type,
2536 RenderFrameProxyHost* source_proxy) {
2537 DCHECK(!source_proxy ||
2538 (source_proxy->GetProcess()->GetID() == GetProcess()->GetID()));
2539 int32_t source_proxy_routing_id = MSG_ROUTING_NONE;
2540 if (source_proxy)
2541 source_proxy_routing_id = source_proxy->GetRoutingID();
2542 Send(
2543 new FrameMsg_AdvanceFocus(GetRoutingID(), type, source_proxy_routing_id));
2544 }
2545
2535 void RenderFrameHostImpl::ExtendSelectionAndDelete(size_t before, 2546 void RenderFrameHostImpl::ExtendSelectionAndDelete(size_t before,
2536 size_t after) { 2547 size_t after) {
2537 Send(new InputMsg_ExtendSelectionAndDelete(routing_id_, before, after)); 2548 Send(new InputMsg_ExtendSelectionAndDelete(routing_id_, before, after));
2538 } 2549 }
2539 2550
2540 void RenderFrameHostImpl::DeleteSurroundingText(size_t before, size_t after) { 2551 void RenderFrameHostImpl::DeleteSurroundingText(size_t before, size_t after) {
2541 Send(new InputMsg_DeleteSurroundingText(routing_id_, before, after)); 2552 Send(new InputMsg_DeleteSurroundingText(routing_id_, before, after));
2542 } 2553 }
2543 2554
2544 void RenderFrameHostImpl::JavaScriptDialogClosed( 2555 void RenderFrameHostImpl::JavaScriptDialogClosed(
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after
3338 // There is no pending NavigationEntry in these cases, so pass 0 as the 3349 // There is no pending NavigationEntry in these cases, so pass 0 as the
3339 // pending_nav_entry_id. If the previous handle was a prematurely aborted 3350 // pending_nav_entry_id. If the previous handle was a prematurely aborted
3340 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. 3351 // navigation loaded via LoadDataWithBaseURL, propagate the entry id.
3341 return NavigationHandleImpl::Create( 3352 return NavigationHandleImpl::Create(
3342 params.url, frame_tree_node_, is_renderer_initiated, 3353 params.url, frame_tree_node_, is_renderer_initiated,
3343 params.was_within_same_page, params.is_srcdoc, base::TimeTicks::Now(), 3354 params.was_within_same_page, params.is_srcdoc, base::TimeTicks::Now(),
3344 entry_id_for_data_nav, false); // started_from_context_menu 3355 entry_id_for_data_nav, false); // started_from_context_menu
3345 } 3356 }
3346 3357
3347 } // namespace content 3358 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698