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

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

Issue 2445193005: Route setHasReceivedUserGesture() state for RemoteFrames (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_proxy_host.h" 5 #include "content/browser/frame_host/render_frame_proxy_host.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "content/browser/bad_message.h" 10 #include "content/browser/bad_message.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 return true; 132 return true;
133 133
134 bool handled = true; 134 bool handled = true;
135 IPC_BEGIN_MESSAGE_MAP(RenderFrameProxyHost, msg) 135 IPC_BEGIN_MESSAGE_MAP(RenderFrameProxyHost, msg)
136 IPC_MESSAGE_HANDLER(FrameHostMsg_Detach, OnDetach) 136 IPC_MESSAGE_HANDLER(FrameHostMsg_Detach, OnDetach)
137 IPC_MESSAGE_HANDLER(FrameHostMsg_OpenURL, OnOpenURL) 137 IPC_MESSAGE_HANDLER(FrameHostMsg_OpenURL, OnOpenURL)
138 IPC_MESSAGE_HANDLER(FrameHostMsg_RouteMessageEvent, OnRouteMessageEvent) 138 IPC_MESSAGE_HANDLER(FrameHostMsg_RouteMessageEvent, OnRouteMessageEvent)
139 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeOpener, OnDidChangeOpener) 139 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeOpener, OnDidChangeOpener)
140 IPC_MESSAGE_HANDLER(FrameHostMsg_AdvanceFocus, OnAdvanceFocus) 140 IPC_MESSAGE_HANDLER(FrameHostMsg_AdvanceFocus, OnAdvanceFocus)
141 IPC_MESSAGE_HANDLER(FrameHostMsg_FrameFocused, OnFrameFocused) 141 IPC_MESSAGE_HANDLER(FrameHostMsg_FrameFocused, OnFrameFocused)
142 IPC_MESSAGE_HANDLER(FrameHostMsg_SetHasReceivedUserGesture,
143 OnSetHasReceivedUserGesture)
142 IPC_MESSAGE_UNHANDLED(handled = false) 144 IPC_MESSAGE_UNHANDLED(handled = false)
143 IPC_END_MESSAGE_MAP() 145 IPC_END_MESSAGE_MAP()
144 return handled; 146 return handled;
145 } 147 }
146 148
147 bool RenderFrameProxyHost::InitRenderFrameProxy() { 149 bool RenderFrameProxyHost::InitRenderFrameProxy() {
148 DCHECK(!render_frame_proxy_created_); 150 DCHECK(!render_frame_proxy_created_);
149 151
150 // It is possible to reach this when the process is dead (in particular, when 152 // It is possible to reach this when the process is dead (in particular, when
151 // creating proxies from CreateProxiesForChildFrame). In that case, don't 153 // creating proxies from CreateProxiesForChildFrame). In that case, don't
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 371
370 target_rfh->Send(new FrameMsg_AdvanceFocus(target_rfh->GetRoutingID(), type, 372 target_rfh->Send(new FrameMsg_AdvanceFocus(target_rfh->GetRoutingID(), type,
371 source_proxy_routing_id)); 373 source_proxy_routing_id));
372 } 374 }
373 375
374 void RenderFrameProxyHost::OnFrameFocused() { 376 void RenderFrameProxyHost::OnFrameFocused() {
375 frame_tree_node_->current_frame_host()->delegate()->SetFocusedFrame( 377 frame_tree_node_->current_frame_host()->delegate()->SetFocusedFrame(
376 frame_tree_node_, GetSiteInstance()); 378 frame_tree_node_, GetSiteInstance());
377 } 379 }
378 380
381 void RenderFrameProxyHost::OnSetHasReceivedUserGesture() {
382 frame_tree_node_->current_frame_host()->SetHasReceivedUserGesture();
383 }
384
379 } // namespace content 385 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698