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