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

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

Issue 1414663011: Notifying the Out of Process Renderer about Visibility Change of a Remote Frame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/renderer/render_frame_proxy.h" 5 #include "content/renderer/render_frame_proxy.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 } 416 }
417 417
418 void RenderFrameProxy::forwardInputEvent(const blink::WebInputEvent* event) { 418 void RenderFrameProxy::forwardInputEvent(const blink::WebInputEvent* event) {
419 Send(new FrameHostMsg_ForwardInputEvent(routing_id_, event)); 419 Send(new FrameHostMsg_ForwardInputEvent(routing_id_, event));
420 } 420 }
421 421
422 void RenderFrameProxy::frameRectsChanged(const blink::WebRect& frame_rect) { 422 void RenderFrameProxy::frameRectsChanged(const blink::WebRect& frame_rect) {
423 Send(new FrameHostMsg_FrameRectChanged(routing_id_, frame_rect)); 423 Send(new FrameHostMsg_FrameRectChanged(routing_id_, frame_rect));
424 } 424 }
425 425
426 void RenderFrameProxy::visibilityChanged(bool visible) {
427 Send(new FrameHostMsg_VisibilityChanged(routing_id_, visible));
428 }
429
426 void RenderFrameProxy::didChangeOpener(blink::WebFrame* opener) { 430 void RenderFrameProxy::didChangeOpener(blink::WebFrame* opener) {
427 // A proxy shouldn't normally be disowning its opener. It is possible to get 431 // A proxy shouldn't normally be disowning its opener. It is possible to get
428 // here when a proxy that is being detached clears its opener, in which case 432 // here when a proxy that is being detached clears its opener, in which case
429 // there is no need to notify the browser process. 433 // there is no need to notify the browser process.
430 if (!opener) 434 if (!opener)
431 return; 435 return;
432 436
433 // Only a LocalFrame (i.e., the caller of window.open) should be able to 437 // Only a LocalFrame (i.e., the caller of window.open) should be able to
434 // update another frame's opener. 438 // update another frame's opener.
435 DCHECK(opener->isWebLocalFrame()); 439 DCHECK(opener->isWebLocalFrame());
436 440
437 int opener_routing_id = 441 int opener_routing_id =
438 RenderFrameImpl::FromWebFrame(opener->toWebLocalFrame())->GetRoutingID(); 442 RenderFrameImpl::FromWebFrame(opener->toWebLocalFrame())->GetRoutingID();
439 Send(new FrameHostMsg_DidChangeOpener(routing_id_, opener_routing_id)); 443 Send(new FrameHostMsg_DidChangeOpener(routing_id_, opener_routing_id));
440 } 444 }
441 445
442 } // namespace 446 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698