| 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 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnRepaint) | 617 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnRepaint) |
| 618 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection) | 618 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection) |
| 619 IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck) | 619 IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck) |
| 620 IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects) | 620 IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects) |
| 621 IPC_MESSAGE_HANDLER(ViewMsg_SetViewportIntersection, | 621 IPC_MESSAGE_HANDLER(ViewMsg_SetViewportIntersection, |
| 622 OnSetViewportIntersection) | 622 OnSetViewportIntersection) |
| 623 IPC_MESSAGE_HANDLER(ViewMsg_WaitForNextFrameForTests, | 623 IPC_MESSAGE_HANDLER(ViewMsg_WaitForNextFrameForTests, |
| 624 OnWaitNextFrameForTests) | 624 OnWaitNextFrameForTests) |
| 625 IPC_MESSAGE_HANDLER(InputMsg_RequestCompositionUpdate, | 625 IPC_MESSAGE_HANDLER(InputMsg_RequestCompositionUpdate, |
| 626 OnRequestCompositionUpdate) | 626 OnRequestCompositionUpdate) |
| 627 IPC_MESSAGE_HANDLER(ViewMsg_HandleCompositorProto, OnHandleCompositorProto) | |
| 628 IPC_MESSAGE_HANDLER(DragMsg_TargetDragEnter, OnDragTargetDragEnter) | 627 IPC_MESSAGE_HANDLER(DragMsg_TargetDragEnter, OnDragTargetDragEnter) |
| 629 IPC_MESSAGE_HANDLER(DragMsg_TargetDragOver, OnDragTargetDragOver) | 628 IPC_MESSAGE_HANDLER(DragMsg_TargetDragOver, OnDragTargetDragOver) |
| 630 IPC_MESSAGE_HANDLER(DragMsg_TargetDragLeave, OnDragTargetDragLeave) | 629 IPC_MESSAGE_HANDLER(DragMsg_TargetDragLeave, OnDragTargetDragLeave) |
| 631 IPC_MESSAGE_HANDLER(DragMsg_TargetDrop, OnDragTargetDrop) | 630 IPC_MESSAGE_HANDLER(DragMsg_TargetDrop, OnDragTargetDrop) |
| 632 IPC_MESSAGE_HANDLER(DragMsg_SourceEnded, OnDragSourceEnded) | 631 IPC_MESSAGE_HANDLER(DragMsg_SourceEnded, OnDragSourceEnded) |
| 633 IPC_MESSAGE_HANDLER(DragMsg_SourceSystemDragEnded, | 632 IPC_MESSAGE_HANDLER(DragMsg_SourceSystemDragEnded, |
| 634 OnDragSourceSystemDragEnded) | 633 OnDragSourceSystemDragEnded) |
| 635 #if defined(OS_ANDROID) | 634 #if defined(OS_ANDROID) |
| 636 IPC_MESSAGE_HANDLER(InputMsg_RequestTextInputStateUpdate, | 635 IPC_MESSAGE_HANDLER(InputMsg_RequestTextInputStateUpdate, |
| 637 OnRequestTextInputStateUpdate) | 636 OnRequestTextInputStateUpdate) |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 903 | 902 |
| 904 ViewHostMsg_UpdateRect_Params params; | 903 ViewHostMsg_UpdateRect_Params params; |
| 905 params.view_size = size_; | 904 params.view_size = size_; |
| 906 params.flags = next_paint_flags_; | 905 params.flags = next_paint_flags_; |
| 907 | 906 |
| 908 Send(new ViewHostMsg_UpdateRect(routing_id_, params)); | 907 Send(new ViewHostMsg_UpdateRect(routing_id_, params)); |
| 909 next_paint_flags_ = 0; | 908 next_paint_flags_ = 0; |
| 910 need_update_rect_for_auto_resize_ = false; | 909 need_update_rect_for_auto_resize_ = false; |
| 911 } | 910 } |
| 912 | 911 |
| 913 void RenderWidget::ForwardCompositorProto(const std::vector<uint8_t>& proto) { | |
| 914 Send(new ViewHostMsg_ForwardCompositorProto(routing_id_, proto)); | |
| 915 } | |
| 916 | |
| 917 bool RenderWidget::IsClosing() const { | 912 bool RenderWidget::IsClosing() const { |
| 918 return host_closing_; | 913 return host_closing_; |
| 919 } | 914 } |
| 920 | 915 |
| 921 void RenderWidget::RequestScheduleAnimation() { | 916 void RenderWidget::RequestScheduleAnimation() { |
| 922 scheduleAnimation(); | 917 scheduleAnimation(); |
| 923 } | 918 } |
| 924 | 919 |
| 925 void RenderWidget::UpdateVisualState() { | 920 void RenderWidget::UpdateVisualState() { |
| 926 GetWebWidget()->updateAllLifecyclePhases(); | 921 GetWebWidget()->updateAllLifecyclePhases(); |
| (...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1665 | 1660 |
| 1666 void RenderWidget::OnSetViewportIntersection( | 1661 void RenderWidget::OnSetViewportIntersection( |
| 1667 const gfx::Rect& viewport_intersection) { | 1662 const gfx::Rect& viewport_intersection) { |
| 1668 if (GetWebWidget() && GetWebWidget()->isWebFrameWidget()) { | 1663 if (GetWebWidget() && GetWebWidget()->isWebFrameWidget()) { |
| 1669 DCHECK(popup_type_ == WebPopupType::WebPopupTypeNone); | 1664 DCHECK(popup_type_ == WebPopupType::WebPopupTypeNone); |
| 1670 static_cast<WebFrameWidget*>(GetWebWidget()) | 1665 static_cast<WebFrameWidget*>(GetWebWidget()) |
| 1671 ->setRemoteViewportIntersection(viewport_intersection); | 1666 ->setRemoteViewportIntersection(viewport_intersection); |
| 1672 } | 1667 } |
| 1673 } | 1668 } |
| 1674 | 1669 |
| 1675 void RenderWidget::OnHandleCompositorProto(const std::vector<uint8_t>& proto) { | |
| 1676 if (compositor_) | |
| 1677 compositor_->OnHandleCompositorProto(proto); | |
| 1678 } | |
| 1679 | |
| 1680 void RenderWidget::OnDragTargetDragEnter( | 1670 void RenderWidget::OnDragTargetDragEnter( |
| 1681 const std::vector<DropData::Metadata>& drop_meta_data, | 1671 const std::vector<DropData::Metadata>& drop_meta_data, |
| 1682 const gfx::Point& client_point, | 1672 const gfx::Point& client_point, |
| 1683 const gfx::Point& screen_point, | 1673 const gfx::Point& screen_point, |
| 1684 WebDragOperationsMask ops, | 1674 WebDragOperationsMask ops, |
| 1685 int key_modifiers) { | 1675 int key_modifiers) { |
| 1686 if (!GetWebWidget()) | 1676 if (!GetWebWidget()) |
| 1687 return; | 1677 return; |
| 1688 | 1678 |
| 1689 DCHECK(GetWebWidget()->isWebFrameWidget()); | 1679 DCHECK(GetWebWidget()->isWebFrameWidget()); |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2273 // browser side (https://crbug.com/669219). | 2263 // browser side (https://crbug.com/669219). |
| 2274 // If there is no WebFrameWidget, then there will be no | 2264 // If there is no WebFrameWidget, then there will be no |
| 2275 // InputMethodControllers for a WebLocalFrame. | 2265 // InputMethodControllers for a WebLocalFrame. |
| 2276 return nullptr; | 2266 return nullptr; |
| 2277 } | 2267 } |
| 2278 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) | 2268 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) |
| 2279 ->getActiveWebInputMethodController(); | 2269 ->getActiveWebInputMethodController(); |
| 2280 } | 2270 } |
| 2281 | 2271 |
| 2282 } // namespace content | 2272 } // namespace content |
| OLD | NEW |