| 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 11 matching lines...) Expand all Loading... |
| 22 #include "content/common/site_isolation_policy.h" | 22 #include "content/common/site_isolation_policy.h" |
| 23 #include "content/common/swapped_out_messages.h" | 23 #include "content/common/swapped_out_messages.h" |
| 24 #include "content/common/view_messages.h" | 24 #include "content/common/view_messages.h" |
| 25 #include "content/renderer/child_frame_compositing_helper.h" | 25 #include "content/renderer/child_frame_compositing_helper.h" |
| 26 #include "content/renderer/render_frame_impl.h" | 26 #include "content/renderer/render_frame_impl.h" |
| 27 #include "content/renderer/render_thread_impl.h" | 27 #include "content/renderer/render_thread_impl.h" |
| 28 #include "content/renderer/render_view_impl.h" | 28 #include "content/renderer/render_view_impl.h" |
| 29 #include "content/renderer/render_widget.h" | 29 #include "content/renderer/render_widget.h" |
| 30 #include "ipc/ipc_message_macros.h" | 30 #include "ipc/ipc_message_macros.h" |
| 31 #include "third_party/WebKit/public/platform/URLConversion.h" | 31 #include "third_party/WebKit/public/platform/URLConversion.h" |
| 32 #include "third_party/WebKit/public/platform/WebRect.h" |
| 32 #include "third_party/WebKit/public/platform/WebString.h" | 33 #include "third_party/WebKit/public/platform/WebString.h" |
| 33 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 34 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| 34 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" | 35 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" |
| 35 #include "third_party/WebKit/public/web/WebView.h" | 36 #include "third_party/WebKit/public/web/WebView.h" |
| 36 | 37 |
| 37 namespace content { | 38 namespace content { |
| 38 | 39 |
| 39 namespace { | 40 namespace { |
| 40 | 41 |
| 41 // Facilitates lookup of RenderFrameProxy by routing_id. | 42 // Facilitates lookup of RenderFrameProxy by routing_id. |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 | 473 |
| 473 void RenderFrameProxy::frameRectsChanged(const blink::WebRect& frame_rect) { | 474 void RenderFrameProxy::frameRectsChanged(const blink::WebRect& frame_rect) { |
| 474 gfx::Rect rect = frame_rect; | 475 gfx::Rect rect = frame_rect; |
| 475 if (IsUseZoomForDSFEnabled()) { | 476 if (IsUseZoomForDSFEnabled()) { |
| 476 rect = gfx::ScaleToEnclosingRect( | 477 rect = gfx::ScaleToEnclosingRect( |
| 477 rect, 1.f / render_widget_->GetOriginalDeviceScaleFactor()); | 478 rect, 1.f / render_widget_->GetOriginalDeviceScaleFactor()); |
| 478 } | 479 } |
| 479 Send(new FrameHostMsg_FrameRectChanged(routing_id_, rect)); | 480 Send(new FrameHostMsg_FrameRectChanged(routing_id_, rect)); |
| 480 } | 481 } |
| 481 | 482 |
| 483 void RenderFrameProxy::updateRemoteViewportIntersection( |
| 484 const blink::WebRect& viewportIntersection) { |
| 485 Send(new FrameHostMsg_UpdateViewportIntersection( |
| 486 routing_id_, gfx::Rect(viewportIntersection))); |
| 487 } |
| 488 |
| 482 void RenderFrameProxy::visibilityChanged(bool visible) { | 489 void RenderFrameProxy::visibilityChanged(bool visible) { |
| 483 Send(new FrameHostMsg_VisibilityChanged(routing_id_, visible)); | 490 Send(new FrameHostMsg_VisibilityChanged(routing_id_, visible)); |
| 484 } | 491 } |
| 485 | 492 |
| 486 void RenderFrameProxy::setHasReceivedUserGesture() { | 493 void RenderFrameProxy::setHasReceivedUserGesture() { |
| 487 Send(new FrameHostMsg_SetHasReceivedUserGesture(routing_id_)); | 494 Send(new FrameHostMsg_SetHasReceivedUserGesture(routing_id_)); |
| 488 } | 495 } |
| 489 | 496 |
| 490 void RenderFrameProxy::didChangeOpener(blink::WebFrame* opener) { | 497 void RenderFrameProxy::didChangeOpener(blink::WebFrame* opener) { |
| 491 // A proxy shouldn't normally be disowning its opener. It is possible to get | 498 // A proxy shouldn't normally be disowning its opener. It is possible to get |
| (...skipping 15 matching lines...) Expand all Loading... |
| 507 blink::WebLocalFrame* source) { | 514 blink::WebLocalFrame* source) { |
| 508 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); | 515 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); |
| 509 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); | 516 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); |
| 510 } | 517 } |
| 511 | 518 |
| 512 void RenderFrameProxy::frameFocused() { | 519 void RenderFrameProxy::frameFocused() { |
| 513 Send(new FrameHostMsg_FrameFocused(routing_id_)); | 520 Send(new FrameHostMsg_FrameFocused(routing_id_)); |
| 514 } | 521 } |
| 515 | 522 |
| 516 } // namespace | 523 } // namespace |
| OLD | NEW |