| 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/WebPoint.h" |
| 33 #include "third_party/WebKit/public/platform/WebRect.h" |
| 32 #include "third_party/WebKit/public/platform/WebString.h" | 34 #include "third_party/WebKit/public/platform/WebString.h" |
| 33 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 35 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| 34 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" | 36 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" |
| 35 #include "third_party/WebKit/public/web/WebView.h" | 37 #include "third_party/WebKit/public/web/WebView.h" |
| 36 | 38 |
| 37 namespace content { | 39 namespace content { |
| 38 | 40 |
| 39 namespace { | 41 namespace { |
| 40 | 42 |
| 41 // Facilitates lookup of RenderFrameProxy by routing_id. | 43 // Facilitates lookup of RenderFrameProxy by routing_id. |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 | 473 |
| 472 void RenderFrameProxy::frameRectsChanged(const blink::WebRect& frame_rect) { | 474 void RenderFrameProxy::frameRectsChanged(const blink::WebRect& frame_rect) { |
| 473 gfx::Rect rect = frame_rect; | 475 gfx::Rect rect = frame_rect; |
| 474 if (IsUseZoomForDSFEnabled()) { | 476 if (IsUseZoomForDSFEnabled()) { |
| 475 rect = gfx::ScaleToEnclosingRect( | 477 rect = gfx::ScaleToEnclosingRect( |
| 476 rect, 1.f / render_widget_->GetOriginalDeviceScaleFactor()); | 478 rect, 1.f / render_widget_->GetOriginalDeviceScaleFactor()); |
| 477 } | 479 } |
| 478 Send(new FrameHostMsg_FrameRectChanged(routing_id_, rect)); | 480 Send(new FrameHostMsg_FrameRectChanged(routing_id_, rect)); |
| 479 } | 481 } |
| 480 | 482 |
| 483 void RenderFrameProxy::updateRemoteViewportIntersection( |
| 484 const blink::WebRect& viewportIntersection, |
| 485 const blink::WebPoint& rootOffset) { |
| 486 // TODO(kenrb): Do we need to account for DSF here, as above? |
| 487 Send(new FrameHostMsg_UpdateViewportIntersection( |
| 488 routing_id_, gfx::Rect(viewportIntersection), gfx::Point(rootOffset))); |
| 489 } |
| 490 |
| 481 void RenderFrameProxy::visibilityChanged(bool visible) { | 491 void RenderFrameProxy::visibilityChanged(bool visible) { |
| 482 Send(new FrameHostMsg_VisibilityChanged(routing_id_, visible)); | 492 Send(new FrameHostMsg_VisibilityChanged(routing_id_, visible)); |
| 483 } | 493 } |
| 484 | 494 |
| 485 void RenderFrameProxy::didChangeOpener(blink::WebFrame* opener) { | 495 void RenderFrameProxy::didChangeOpener(blink::WebFrame* opener) { |
| 486 // A proxy shouldn't normally be disowning its opener. It is possible to get | 496 // A proxy shouldn't normally be disowning its opener. It is possible to get |
| 487 // here when a proxy that is being detached clears its opener, in which case | 497 // here when a proxy that is being detached clears its opener, in which case |
| 488 // there is no need to notify the browser process. | 498 // there is no need to notify the browser process. |
| 489 if (!opener) | 499 if (!opener) |
| 490 return; | 500 return; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 502 blink::WebLocalFrame* source) { | 512 blink::WebLocalFrame* source) { |
| 503 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); | 513 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); |
| 504 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); | 514 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); |
| 505 } | 515 } |
| 506 | 516 |
| 507 void RenderFrameProxy::frameFocused() { | 517 void RenderFrameProxy::frameFocused() { |
| 508 Send(new FrameHostMsg_FrameFocused(routing_id_)); | 518 Send(new FrameHostMsg_FrameFocused(routing_id_)); |
| 509 } | 519 } |
| 510 | 520 |
| 511 } // namespace | 521 } // namespace |
| OLD | NEW |