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

Unified 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, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 25b2262f9b04b79d4d62996514af921e0998a259..a664c77d19fdf408709e80318cf0fa6beb0df268 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -2532,6 +2532,17 @@ void RenderFrameHostImpl::SetFocusedFrame() {
Send(new FrameMsg_SetFocusedFrame(routing_id_));
}
+void RenderFrameHostImpl::AdvanceFocus(blink::WebFocusType type,
+ RenderFrameProxyHost* source_proxy) {
+ DCHECK(!source_proxy ||
+ (source_proxy->GetProcess()->GetID() == GetProcess()->GetID()));
+ int32_t source_proxy_routing_id = MSG_ROUTING_NONE;
+ if (source_proxy)
+ source_proxy_routing_id = source_proxy->GetRoutingID();
+ Send(
+ new FrameMsg_AdvanceFocus(GetRoutingID(), type, source_proxy_routing_id));
+}
+
void RenderFrameHostImpl::ExtendSelectionAndDelete(size_t before,
size_t after) {
Send(new InputMsg_ExtendSelectionAndDelete(routing_id_, before, after));

Powered by Google App Engine
This is Rietveld 408576698