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

Side by Side Diff: content/renderer/render_frame_proxy.cc

Issue 1685213002: Propagate window coordinates to out-of-process iframes renderers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sendscreenrects
Patch Set: addressing comments Created 4 years, 9 months 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/renderer/render_frame_proxy.h" 5 #include "content/renderer/render_frame_proxy.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/lazy_instance.h" 12 #include "base/lazy_instance.h"
13 #include "content/child/webmessageportchannel_impl.h" 13 #include "content/child/webmessageportchannel_impl.h"
14 #include "content/common/frame_messages.h" 14 #include "content/common/frame_messages.h"
15 #include "content/common/frame_replication_state.h" 15 #include "content/common/frame_replication_state.h"
16 #include "content/common/input_messages.h" 16 #include "content/common/input_messages.h"
17 #include "content/common/page_messages.h"
17 #include "content/common/site_isolation_policy.h" 18 #include "content/common/site_isolation_policy.h"
18 #include "content/common/swapped_out_messages.h" 19 #include "content/common/swapped_out_messages.h"
19 #include "content/common/view_messages.h" 20 #include "content/common/view_messages.h"
20 #include "content/renderer/child_frame_compositing_helper.h" 21 #include "content/renderer/child_frame_compositing_helper.h"
21 #include "content/renderer/render_frame_impl.h" 22 #include "content/renderer/render_frame_impl.h"
22 #include "content/renderer/render_thread_impl.h" 23 #include "content/renderer/render_thread_impl.h"
23 #include "content/renderer/render_view_impl.h" 24 #include "content/renderer/render_view_impl.h"
24 #include "content/renderer/render_widget.h" 25 #include "content/renderer/render_widget.h"
26 #include "ipc/ipc_message_macros.h"
25 #include "third_party/WebKit/public/platform/URLConversion.h" 27 #include "third_party/WebKit/public/platform/URLConversion.h"
26 #include "third_party/WebKit/public/platform/WebString.h" 28 #include "third_party/WebKit/public/platform/WebString.h"
27 #include "third_party/WebKit/public/web/WebLocalFrame.h" 29 #include "third_party/WebKit/public/web/WebLocalFrame.h"
28 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" 30 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h"
29 #include "third_party/WebKit/public/web/WebView.h" 31 #include "third_party/WebKit/public/web/WebView.h"
30 32
31 namespace content { 33 namespace content {
32 34
33 namespace { 35 namespace {
34 36
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 // SecurityContext. This is needed to ensure that sandbox flags are inherited 246 // SecurityContext. This is needed to ensure that sandbox flags are inherited
245 // properly if this proxy ever parents a local frame. The proxy's FrameOwner 247 // properly if this proxy ever parents a local frame. The proxy's FrameOwner
246 // flags are also updated here with the caveat that the FrameOwner won't learn 248 // flags are also updated here with the caveat that the FrameOwner won't learn
247 // about updates to its flags until they take effect. 249 // about updates to its flags until they take effect.
248 void RenderFrameProxy::OnDidUpdateSandboxFlags(blink::WebSandboxFlags flags) { 250 void RenderFrameProxy::OnDidUpdateSandboxFlags(blink::WebSandboxFlags flags) {
249 web_frame_->setReplicatedSandboxFlags(flags); 251 web_frame_->setReplicatedSandboxFlags(flags);
250 web_frame_->setFrameOwnerSandboxFlags(flags); 252 web_frame_->setFrameOwnerSandboxFlags(flags);
251 } 253 }
252 254
253 bool RenderFrameProxy::OnMessageReceived(const IPC::Message& msg) { 255 bool RenderFrameProxy::OnMessageReceived(const IPC::Message& msg) {
256 // Forward Page IPCs to the RenderView.
257 if ((IPC_MESSAGE_CLASS(msg) == PageMsgStart) && render_view())
258 return render_view()->OnMessageReceived(msg);
nasko 2016/03/03 18:28:57 Why not use the same structure as in RenderFrameIm
lfg 2016/03/03 22:09:38 Done.
259
254 bool handled = true; 260 bool handled = true;
255 IPC_BEGIN_MESSAGE_MAP(RenderFrameProxy, msg) 261 IPC_BEGIN_MESSAGE_MAP(RenderFrameProxy, msg)
256 IPC_MESSAGE_HANDLER(FrameMsg_DeleteProxy, OnDeleteProxy) 262 IPC_MESSAGE_HANDLER(FrameMsg_DeleteProxy, OnDeleteProxy)
257 IPC_MESSAGE_HANDLER(FrameMsg_ChildFrameProcessGone, OnChildFrameProcessGone) 263 IPC_MESSAGE_HANDLER(FrameMsg_ChildFrameProcessGone, OnChildFrameProcessGone)
258 IPC_MESSAGE_HANDLER(FrameMsg_SetChildFrameSurface, OnSetChildFrameSurface) 264 IPC_MESSAGE_HANDLER(FrameMsg_SetChildFrameSurface, OnSetChildFrameSurface)
259 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener) 265 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener)
260 IPC_MESSAGE_HANDLER(FrameMsg_DidStartLoading, OnDidStartLoading) 266 IPC_MESSAGE_HANDLER(FrameMsg_DidStartLoading, OnDidStartLoading)
261 IPC_MESSAGE_HANDLER(FrameMsg_DidStopLoading, OnDidStopLoading) 267 IPC_MESSAGE_HANDLER(FrameMsg_DidStopLoading, OnDidStopLoading)
262 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags) 268 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags)
263 IPC_MESSAGE_HANDLER(FrameMsg_DispatchLoad, OnDispatchLoad) 269 IPC_MESSAGE_HANDLER(FrameMsg_DispatchLoad, OnDispatchLoad)
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 blink::WebLocalFrame* source) { 485 blink::WebLocalFrame* source) {
480 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); 486 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID();
481 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); 487 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id));
482 } 488 }
483 489
484 void RenderFrameProxy::frameFocused() { 490 void RenderFrameProxy::frameFocused() {
485 Send(new FrameHostMsg_FrameFocused(routing_id_)); 491 Send(new FrameHostMsg_FrameFocused(routing_id_));
486 } 492 }
487 493
488 } // namespace 494 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698