| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 void RenderFrameProxy::UpdateRemoteViewportIntersection( | 504 void RenderFrameProxy::UpdateRemoteViewportIntersection( |
| 505 const blink::WebRect& viewportIntersection) { | 505 const blink::WebRect& viewportIntersection) { |
| 506 Send(new FrameHostMsg_UpdateViewportIntersection( | 506 Send(new FrameHostMsg_UpdateViewportIntersection( |
| 507 routing_id_, gfx::Rect(viewportIntersection))); | 507 routing_id_, gfx::Rect(viewportIntersection))); |
| 508 } | 508 } |
| 509 | 509 |
| 510 void RenderFrameProxy::VisibilityChanged(bool visible) { | 510 void RenderFrameProxy::VisibilityChanged(bool visible) { |
| 511 Send(new FrameHostMsg_VisibilityChanged(routing_id_, visible)); | 511 Send(new FrameHostMsg_VisibilityChanged(routing_id_, visible)); |
| 512 } | 512 } |
| 513 | 513 |
| 514 void RenderFrameProxy::SetIsInert(bool inert) { |
| 515 Send(new FrameHostMsg_SetIsInert(routing_id_, inert)); |
| 516 } |
| 517 |
| 514 void RenderFrameProxy::DidChangeOpener(blink::WebFrame* opener) { | 518 void RenderFrameProxy::DidChangeOpener(blink::WebFrame* opener) { |
| 515 // A proxy shouldn't normally be disowning its opener. It is possible to get | 519 // A proxy shouldn't normally be disowning its opener. It is possible to get |
| 516 // here when a proxy that is being detached clears its opener, in which case | 520 // here when a proxy that is being detached clears its opener, in which case |
| 517 // there is no need to notify the browser process. | 521 // there is no need to notify the browser process. |
| 518 if (!opener) | 522 if (!opener) |
| 519 return; | 523 return; |
| 520 | 524 |
| 521 // Only a LocalFrame (i.e., the caller of window.open) should be able to | 525 // Only a LocalFrame (i.e., the caller of window.open) should be able to |
| 522 // update another frame's opener. | 526 // update another frame's opener. |
| 523 DCHECK(opener->IsWebLocalFrame()); | 527 DCHECK(opener->IsWebLocalFrame()); |
| 524 | 528 |
| 525 int opener_routing_id = | 529 int opener_routing_id = |
| 526 RenderFrameImpl::FromWebFrame(opener->ToWebLocalFrame())->GetRoutingID(); | 530 RenderFrameImpl::FromWebFrame(opener->ToWebLocalFrame())->GetRoutingID(); |
| 527 Send(new FrameHostMsg_DidChangeOpener(routing_id_, opener_routing_id)); | 531 Send(new FrameHostMsg_DidChangeOpener(routing_id_, opener_routing_id)); |
| 528 } | 532 } |
| 529 | 533 |
| 530 void RenderFrameProxy::AdvanceFocus(blink::WebFocusType type, | 534 void RenderFrameProxy::AdvanceFocus(blink::WebFocusType type, |
| 531 blink::WebLocalFrame* source) { | 535 blink::WebLocalFrame* source) { |
| 532 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); | 536 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); |
| 533 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); | 537 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); |
| 534 } | 538 } |
| 535 | 539 |
| 536 void RenderFrameProxy::FrameFocused() { | 540 void RenderFrameProxy::FrameFocused() { |
| 537 Send(new FrameHostMsg_FrameFocused(routing_id_)); | 541 Send(new FrameHostMsg_FrameFocused(routing_id_)); |
| 538 } | 542 } |
| 539 | 543 |
| 540 } // namespace | 544 } // namespace |
| OLD | NEW |