| 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 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 IPC_MESSAGE_HANDLER(ViewMsg_EnableDeviceEmulation, | 614 IPC_MESSAGE_HANDLER(ViewMsg_EnableDeviceEmulation, |
| 615 OnEnableDeviceEmulation) | 615 OnEnableDeviceEmulation) |
| 616 IPC_MESSAGE_HANDLER(ViewMsg_DisableDeviceEmulation, | 616 IPC_MESSAGE_HANDLER(ViewMsg_DisableDeviceEmulation, |
| 617 OnDisableDeviceEmulation) | 617 OnDisableDeviceEmulation) |
| 618 IPC_MESSAGE_HANDLER(ViewMsg_WasHidden, OnWasHidden) | 618 IPC_MESSAGE_HANDLER(ViewMsg_WasHidden, OnWasHidden) |
| 619 IPC_MESSAGE_HANDLER(ViewMsg_WasShown, OnWasShown) | 619 IPC_MESSAGE_HANDLER(ViewMsg_WasShown, OnWasShown) |
| 620 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnRepaint) | 620 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnRepaint) |
| 621 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection) | 621 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection) |
| 622 IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck) | 622 IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck) |
| 623 IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects) | 623 IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects) |
| 624 IPC_MESSAGE_HANDLER(ViewMsg_SetViewportIntersection, |
| 625 OnSetViewportIntersection) |
| 624 IPC_MESSAGE_HANDLER(ViewMsg_WaitForNextFrameForTests, | 626 IPC_MESSAGE_HANDLER(ViewMsg_WaitForNextFrameForTests, |
| 625 OnWaitNextFrameForTests) | 627 OnWaitNextFrameForTests) |
| 626 IPC_MESSAGE_HANDLER(InputMsg_RequestCompositionUpdate, | 628 IPC_MESSAGE_HANDLER(InputMsg_RequestCompositionUpdate, |
| 627 OnRequestCompositionUpdate) | 629 OnRequestCompositionUpdate) |
| 628 IPC_MESSAGE_HANDLER(ViewMsg_HandleCompositorProto, OnHandleCompositorProto) | 630 IPC_MESSAGE_HANDLER(ViewMsg_HandleCompositorProto, OnHandleCompositorProto) |
| 629 IPC_MESSAGE_HANDLER(DragMsg_TargetDragEnter, OnDragTargetDragEnter) | 631 IPC_MESSAGE_HANDLER(DragMsg_TargetDragEnter, OnDragTargetDragEnter) |
| 630 IPC_MESSAGE_HANDLER(DragMsg_TargetDragOver, OnDragTargetDragOver) | 632 IPC_MESSAGE_HANDLER(DragMsg_TargetDragOver, OnDragTargetDragOver) |
| 631 IPC_MESSAGE_HANDLER(DragMsg_TargetDragLeave, OnDragTargetDragLeave) | 633 IPC_MESSAGE_HANDLER(DragMsg_TargetDragLeave, OnDragTargetDragLeave) |
| 632 IPC_MESSAGE_HANDLER(DragMsg_TargetDrop, OnDragTargetDrop) | 634 IPC_MESSAGE_HANDLER(DragMsg_TargetDrop, OnDragTargetDrop) |
| 633 IPC_MESSAGE_HANDLER(DragMsg_SourceEnded, OnDragSourceEnded) | 635 IPC_MESSAGE_HANDLER(DragMsg_SourceEnded, OnDragSourceEnded) |
| (...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1642 } | 1644 } |
| 1643 | 1645 |
| 1644 void RenderWidget::OnUpdateWindowScreenRect( | 1646 void RenderWidget::OnUpdateWindowScreenRect( |
| 1645 const gfx::Rect& window_screen_rect) { | 1647 const gfx::Rect& window_screen_rect) { |
| 1646 if (screen_metrics_emulator_) | 1648 if (screen_metrics_emulator_) |
| 1647 screen_metrics_emulator_->OnUpdateWindowScreenRect(window_screen_rect); | 1649 screen_metrics_emulator_->OnUpdateWindowScreenRect(window_screen_rect); |
| 1648 else | 1650 else |
| 1649 window_screen_rect_ = window_screen_rect; | 1651 window_screen_rect_ = window_screen_rect; |
| 1650 } | 1652 } |
| 1651 | 1653 |
| 1654 void RenderWidget::OnSetViewportIntersection( |
| 1655 const gfx::Rect& viewport_intersection) { |
| 1656 if (GetWebWidget()) |
| 1657 GetWebWidget()->setRemoteViewportIntersection(viewport_intersection); |
| 1658 } |
| 1659 |
| 1652 void RenderWidget::OnHandleCompositorProto(const std::vector<uint8_t>& proto) { | 1660 void RenderWidget::OnHandleCompositorProto(const std::vector<uint8_t>& proto) { |
| 1653 if (compositor_) | 1661 if (compositor_) |
| 1654 compositor_->OnHandleCompositorProto(proto); | 1662 compositor_->OnHandleCompositorProto(proto); |
| 1655 } | 1663 } |
| 1656 | 1664 |
| 1657 void RenderWidget::OnDragTargetDragEnter( | 1665 void RenderWidget::OnDragTargetDragEnter( |
| 1658 const std::vector<DropData::Metadata>& drop_meta_data, | 1666 const std::vector<DropData::Metadata>& drop_meta_data, |
| 1659 const gfx::Point& client_point, | 1667 const gfx::Point& client_point, |
| 1660 const gfx::Point& screen_point, | 1668 const gfx::Point& screen_point, |
| 1661 WebDragOperationsMask ops, | 1669 WebDragOperationsMask ops, |
| (...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2305 blink::WebInputMethodController* RenderWidget::GetInputMethodController() | 2313 blink::WebInputMethodController* RenderWidget::GetInputMethodController() |
| 2306 const { | 2314 const { |
| 2307 // TODO(ekaramad): Remove this CHECK when GetWebWidget() is | 2315 // TODO(ekaramad): Remove this CHECK when GetWebWidget() is |
| 2308 // always a WebFrameWidget. | 2316 // always a WebFrameWidget. |
| 2309 CHECK(GetWebWidget()->isWebFrameWidget()); | 2317 CHECK(GetWebWidget()->isWebFrameWidget()); |
| 2310 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) | 2318 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) |
| 2311 ->getActiveWebInputMethodController(); | 2319 ->getActiveWebInputMethodController(); |
| 2312 } | 2320 } |
| 2313 | 2321 |
| 2314 } // namespace content | 2322 } // namespace content |
| OLD | NEW |