| 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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 rect = gfx::ScaleToEnclosingRect( | 476 rect = gfx::ScaleToEnclosingRect( |
| 477 rect, 1.f / render_widget_->GetOriginalDeviceScaleFactor()); | 477 rect, 1.f / render_widget_->GetOriginalDeviceScaleFactor()); |
| 478 } | 478 } |
| 479 Send(new FrameHostMsg_FrameRectChanged(routing_id_, rect)); | 479 Send(new FrameHostMsg_FrameRectChanged(routing_id_, rect)); |
| 480 } | 480 } |
| 481 | 481 |
| 482 void RenderFrameProxy::visibilityChanged(bool visible) { | 482 void RenderFrameProxy::visibilityChanged(bool visible) { |
| 483 Send(new FrameHostMsg_VisibilityChanged(routing_id_, visible)); | 483 Send(new FrameHostMsg_VisibilityChanged(routing_id_, visible)); |
| 484 } | 484 } |
| 485 | 485 |
| 486 void RenderFrameProxy::setHasReceivedUserGesture() { |
| 487 Send(new FrameHostMsg_SetHasReceivedUserGesture(routing_id_)); |
| 488 } |
| 489 |
| 486 void RenderFrameProxy::didChangeOpener(blink::WebFrame* opener) { | 490 void RenderFrameProxy::didChangeOpener(blink::WebFrame* opener) { |
| 487 // A proxy shouldn't normally be disowning its opener. It is possible to get | 491 // A proxy shouldn't normally be disowning its opener. It is possible to get |
| 488 // here when a proxy that is being detached clears its opener, in which case | 492 // here when a proxy that is being detached clears its opener, in which case |
| 489 // there is no need to notify the browser process. | 493 // there is no need to notify the browser process. |
| 490 if (!opener) | 494 if (!opener) |
| 491 return; | 495 return; |
| 492 | 496 |
| 493 // Only a LocalFrame (i.e., the caller of window.open) should be able to | 497 // Only a LocalFrame (i.e., the caller of window.open) should be able to |
| 494 // update another frame's opener. | 498 // update another frame's opener. |
| 495 DCHECK(opener->isWebLocalFrame()); | 499 DCHECK(opener->isWebLocalFrame()); |
| 496 | 500 |
| 497 int opener_routing_id = | 501 int opener_routing_id = |
| 498 RenderFrameImpl::FromWebFrame(opener->toWebLocalFrame())->GetRoutingID(); | 502 RenderFrameImpl::FromWebFrame(opener->toWebLocalFrame())->GetRoutingID(); |
| 499 Send(new FrameHostMsg_DidChangeOpener(routing_id_, opener_routing_id)); | 503 Send(new FrameHostMsg_DidChangeOpener(routing_id_, opener_routing_id)); |
| 500 } | 504 } |
| 501 | 505 |
| 502 void RenderFrameProxy::advanceFocus(blink::WebFocusType type, | 506 void RenderFrameProxy::advanceFocus(blink::WebFocusType type, |
| 503 blink::WebLocalFrame* source) { | 507 blink::WebLocalFrame* source) { |
| 504 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); | 508 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); |
| 505 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); | 509 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); |
| 506 } | 510 } |
| 507 | 511 |
| 508 void RenderFrameProxy::frameFocused() { | 512 void RenderFrameProxy::frameFocused() { |
| 509 Send(new FrameHostMsg_FrameFocused(routing_id_)); | 513 Send(new FrameHostMsg_FrameFocused(routing_id_)); |
| 510 } | 514 } |
| 511 | 515 |
| 512 } // namespace | 516 } // namespace |
| OLD | NEW |