OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_widget.h" | 5 #include "content/renderer/render_widget.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 IPC_MESSAGE_HANDLER(ViewMsg_EnableDeviceEmulation, | 609 IPC_MESSAGE_HANDLER(ViewMsg_EnableDeviceEmulation, |
610 OnEnableDeviceEmulation) | 610 OnEnableDeviceEmulation) |
611 IPC_MESSAGE_HANDLER(ViewMsg_DisableDeviceEmulation, | 611 IPC_MESSAGE_HANDLER(ViewMsg_DisableDeviceEmulation, |
612 OnDisableDeviceEmulation) | 612 OnDisableDeviceEmulation) |
613 IPC_MESSAGE_HANDLER(ViewMsg_WasHidden, OnWasHidden) | 613 IPC_MESSAGE_HANDLER(ViewMsg_WasHidden, OnWasHidden) |
614 IPC_MESSAGE_HANDLER(ViewMsg_WasShown, OnWasShown) | 614 IPC_MESSAGE_HANDLER(ViewMsg_WasShown, OnWasShown) |
615 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnRepaint) | 615 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnRepaint) |
616 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection) | 616 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection) |
617 IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck) | 617 IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck) |
618 IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects) | 618 IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects) |
| 619 IPC_MESSAGE_HANDLER(ViewMsg_SetViewportIntersection, |
| 620 OnSetViewportIntersection) |
619 IPC_MESSAGE_HANDLER(ViewMsg_WaitForNextFrameForTests, | 621 IPC_MESSAGE_HANDLER(ViewMsg_WaitForNextFrameForTests, |
620 OnWaitNextFrameForTests) | 622 OnWaitNextFrameForTests) |
621 IPC_MESSAGE_HANDLER(InputMsg_RequestCompositionUpdate, | 623 IPC_MESSAGE_HANDLER(InputMsg_RequestCompositionUpdate, |
622 OnRequestCompositionUpdate) | 624 OnRequestCompositionUpdate) |
623 IPC_MESSAGE_HANDLER(ViewMsg_HandleCompositorProto, OnHandleCompositorProto) | 625 IPC_MESSAGE_HANDLER(ViewMsg_HandleCompositorProto, OnHandleCompositorProto) |
624 IPC_MESSAGE_HANDLER(DragMsg_TargetDragEnter, OnDragTargetDragEnter) | 626 IPC_MESSAGE_HANDLER(DragMsg_TargetDragEnter, OnDragTargetDragEnter) |
625 IPC_MESSAGE_HANDLER(DragMsg_TargetDragOver, OnDragTargetDragOver) | 627 IPC_MESSAGE_HANDLER(DragMsg_TargetDragOver, OnDragTargetDragOver) |
626 IPC_MESSAGE_HANDLER(DragMsg_TargetDragLeave, OnDragTargetDragLeave) | 628 IPC_MESSAGE_HANDLER(DragMsg_TargetDragLeave, OnDragTargetDragLeave) |
627 IPC_MESSAGE_HANDLER(DragMsg_TargetDrop, OnDragTargetDrop) | 629 IPC_MESSAGE_HANDLER(DragMsg_TargetDrop, OnDragTargetDrop) |
628 IPC_MESSAGE_HANDLER(DragMsg_SourceEnded, OnDragSourceEnded) | 630 IPC_MESSAGE_HANDLER(DragMsg_SourceEnded, OnDragSourceEnded) |
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1627 } | 1629 } |
1628 | 1630 |
1629 void RenderWidget::OnUpdateWindowScreenRect( | 1631 void RenderWidget::OnUpdateWindowScreenRect( |
1630 const gfx::Rect& window_screen_rect) { | 1632 const gfx::Rect& window_screen_rect) { |
1631 if (screen_metrics_emulator_) | 1633 if (screen_metrics_emulator_) |
1632 screen_metrics_emulator_->OnUpdateWindowScreenRect(window_screen_rect); | 1634 screen_metrics_emulator_->OnUpdateWindowScreenRect(window_screen_rect); |
1633 else | 1635 else |
1634 window_screen_rect_ = window_screen_rect; | 1636 window_screen_rect_ = window_screen_rect; |
1635 } | 1637 } |
1636 | 1638 |
| 1639 void RenderWidget::OnSetViewportIntersection( |
| 1640 const gfx::Rect& viewport_intersection) { |
| 1641 if (GetWebWidget()) |
| 1642 GetWebWidget()->setRemoteViewportIntersection(viewport_intersection); |
| 1643 } |
| 1644 |
1637 void RenderWidget::OnHandleCompositorProto(const std::vector<uint8_t>& proto) { | 1645 void RenderWidget::OnHandleCompositorProto(const std::vector<uint8_t>& proto) { |
1638 if (compositor_) | 1646 if (compositor_) |
1639 compositor_->OnHandleCompositorProto(proto); | 1647 compositor_->OnHandleCompositorProto(proto); |
1640 } | 1648 } |
1641 | 1649 |
1642 void RenderWidget::OnDragTargetDragEnter( | 1650 void RenderWidget::OnDragTargetDragEnter( |
1643 const std::vector<DropData::Metadata>& drop_meta_data, | 1651 const std::vector<DropData::Metadata>& drop_meta_data, |
1644 const gfx::Point& client_point, | 1652 const gfx::Point& client_point, |
1645 const gfx::Point& screen_point, | 1653 const gfx::Point& screen_point, |
1646 WebDragOperationsMask ops, | 1654 WebDragOperationsMask ops, |
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2240 // browser side (https://crbug.com/669219). | 2248 // browser side (https://crbug.com/669219). |
2241 // If there is no WebFrameWidget, then there will be no | 2249 // If there is no WebFrameWidget, then there will be no |
2242 // InputMethodControllers for a WebLocalFrame. | 2250 // InputMethodControllers for a WebLocalFrame. |
2243 return nullptr; | 2251 return nullptr; |
2244 } | 2252 } |
2245 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) | 2253 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) |
2246 ->getActiveWebInputMethodController(); | 2254 ->getActiveWebInputMethodController(); |
2247 } | 2255 } |
2248 | 2256 |
2249 } // namespace content | 2257 } // namespace content |
OLD | NEW |