| OLD | NEW |
| 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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 } | 423 } |
| 424 | 424 |
| 425 void RenderFrameProxy::forwardInputEvent(const blink::WebInputEvent* event) { | 425 void RenderFrameProxy::forwardInputEvent(const blink::WebInputEvent* event) { |
| 426 Send(new FrameHostMsg_ForwardInputEvent(routing_id_, event)); | 426 Send(new FrameHostMsg_ForwardInputEvent(routing_id_, event)); |
| 427 } | 427 } |
| 428 | 428 |
| 429 void RenderFrameProxy::frameRectsChanged(const blink::WebRect& frame_rect) { | 429 void RenderFrameProxy::frameRectsChanged(const blink::WebRect& frame_rect) { |
| 430 Send(new FrameHostMsg_FrameRectChanged(routing_id_, frame_rect)); | 430 Send(new FrameHostMsg_FrameRectChanged(routing_id_, frame_rect)); |
| 431 } | 431 } |
| 432 | 432 |
| 433 void RenderFrameProxy::visibilityChanged(bool visible) { |
| 434 Send(new FrameHostMsg_VisibilityChanged(routing_id_, visible)); |
| 435 } |
| 436 |
| 433 void RenderFrameProxy::didChangeOpener(blink::WebFrame* opener) { | 437 void RenderFrameProxy::didChangeOpener(blink::WebFrame* opener) { |
| 434 // A proxy shouldn't normally be disowning its opener. It is possible to get | 438 // A proxy shouldn't normally be disowning its opener. It is possible to get |
| 435 // here when a proxy that is being detached clears its opener, in which case | 439 // here when a proxy that is being detached clears its opener, in which case |
| 436 // there is no need to notify the browser process. | 440 // there is no need to notify the browser process. |
| 437 if (!opener) | 441 if (!opener) |
| 438 return; | 442 return; |
| 439 | 443 |
| 440 // Only a LocalFrame (i.e., the caller of window.open) should be able to | 444 // Only a LocalFrame (i.e., the caller of window.open) should be able to |
| 441 // update another frame's opener. | 445 // update another frame's opener. |
| 442 DCHECK(opener->isWebLocalFrame()); | 446 DCHECK(opener->isWebLocalFrame()); |
| 443 | 447 |
| 444 int opener_routing_id = | 448 int opener_routing_id = |
| 445 RenderFrameImpl::FromWebFrame(opener->toWebLocalFrame())->GetRoutingID(); | 449 RenderFrameImpl::FromWebFrame(opener->toWebLocalFrame())->GetRoutingID(); |
| 446 Send(new FrameHostMsg_DidChangeOpener(routing_id_, opener_routing_id)); | 450 Send(new FrameHostMsg_DidChangeOpener(routing_id_, opener_routing_id)); |
| 447 } | 451 } |
| 448 | 452 |
| 449 } // namespace | 453 } // namespace |
| OLD | NEW |