| 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 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 IPC_MESSAGE_HANDLER(ViewMsg_DisableDeviceEmulation, | 618 IPC_MESSAGE_HANDLER(ViewMsg_DisableDeviceEmulation, |
| 619 OnDisableDeviceEmulation) | 619 OnDisableDeviceEmulation) |
| 620 IPC_MESSAGE_HANDLER(ViewMsg_WasHidden, OnWasHidden) | 620 IPC_MESSAGE_HANDLER(ViewMsg_WasHidden, OnWasHidden) |
| 621 IPC_MESSAGE_HANDLER(ViewMsg_WasShown, OnWasShown) | 621 IPC_MESSAGE_HANDLER(ViewMsg_WasShown, OnWasShown) |
| 622 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnRepaint) | 622 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnRepaint) |
| 623 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection) | 623 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection) |
| 624 IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck) | 624 IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck) |
| 625 IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects) | 625 IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects) |
| 626 IPC_MESSAGE_HANDLER(ViewMsg_SetViewportIntersection, | 626 IPC_MESSAGE_HANDLER(ViewMsg_SetViewportIntersection, |
| 627 OnSetViewportIntersection) | 627 OnSetViewportIntersection) |
| 628 IPC_MESSAGE_HANDLER(ViewMsg_SetIsInert, OnSetIsInert) |
| 628 IPC_MESSAGE_HANDLER(ViewMsg_WaitForNextFrameForTests, | 629 IPC_MESSAGE_HANDLER(ViewMsg_WaitForNextFrameForTests, |
| 629 OnWaitNextFrameForTests) | 630 OnWaitNextFrameForTests) |
| 630 IPC_MESSAGE_HANDLER(InputMsg_RequestCompositionUpdates, | 631 IPC_MESSAGE_HANDLER(InputMsg_RequestCompositionUpdates, |
| 631 OnRequestCompositionUpdates) | 632 OnRequestCompositionUpdates) |
| 632 IPC_MESSAGE_HANDLER(DragMsg_TargetDragEnter, OnDragTargetDragEnter) | 633 IPC_MESSAGE_HANDLER(DragMsg_TargetDragEnter, OnDragTargetDragEnter) |
| 633 IPC_MESSAGE_HANDLER(DragMsg_TargetDragOver, OnDragTargetDragOver) | 634 IPC_MESSAGE_HANDLER(DragMsg_TargetDragOver, OnDragTargetDragOver) |
| 634 IPC_MESSAGE_HANDLER(DragMsg_TargetDragLeave, OnDragTargetDragLeave) | 635 IPC_MESSAGE_HANDLER(DragMsg_TargetDragLeave, OnDragTargetDragLeave) |
| 635 IPC_MESSAGE_HANDLER(DragMsg_TargetDrop, OnDragTargetDrop) | 636 IPC_MESSAGE_HANDLER(DragMsg_TargetDrop, OnDragTargetDrop) |
| 636 IPC_MESSAGE_HANDLER(DragMsg_SourceEnded, OnDragSourceEnded) | 637 IPC_MESSAGE_HANDLER(DragMsg_SourceEnded, OnDragSourceEnded) |
| 637 IPC_MESSAGE_HANDLER(DragMsg_SourceSystemDragEnded, | 638 IPC_MESSAGE_HANDLER(DragMsg_SourceSystemDragEnded, |
| (...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1760 | 1761 |
| 1761 void RenderWidget::OnSetViewportIntersection( | 1762 void RenderWidget::OnSetViewportIntersection( |
| 1762 const gfx::Rect& viewport_intersection) { | 1763 const gfx::Rect& viewport_intersection) { |
| 1763 if (GetWebWidget() && GetWebWidget()->IsWebFrameWidget()) { | 1764 if (GetWebWidget() && GetWebWidget()->IsWebFrameWidget()) { |
| 1764 DCHECK(popup_type_ == WebPopupType::kWebPopupTypeNone); | 1765 DCHECK(popup_type_ == WebPopupType::kWebPopupTypeNone); |
| 1765 static_cast<WebFrameWidget*>(GetWebWidget()) | 1766 static_cast<WebFrameWidget*>(GetWebWidget()) |
| 1766 ->SetRemoteViewportIntersection(viewport_intersection); | 1767 ->SetRemoteViewportIntersection(viewport_intersection); |
| 1767 } | 1768 } |
| 1768 } | 1769 } |
| 1769 | 1770 |
| 1771 void RenderWidget::OnSetIsInert(bool inert) { |
| 1772 if (GetWebWidget() && GetWebWidget()->IsWebFrameWidget()) { |
| 1773 DCHECK(popup_type_ == WebPopupType::kWebPopupTypeNone); |
| 1774 static_cast<WebFrameWidget*>(GetWebWidget())->SetIsInert(inert); |
| 1775 } |
| 1776 } |
| 1777 |
| 1770 void RenderWidget::OnDragTargetDragEnter( | 1778 void RenderWidget::OnDragTargetDragEnter( |
| 1771 const std::vector<DropData::Metadata>& drop_meta_data, | 1779 const std::vector<DropData::Metadata>& drop_meta_data, |
| 1772 const gfx::Point& client_point, | 1780 const gfx::Point& client_point, |
| 1773 const gfx::Point& screen_point, | 1781 const gfx::Point& screen_point, |
| 1774 WebDragOperationsMask ops, | 1782 WebDragOperationsMask ops, |
| 1775 int key_modifiers) { | 1783 int key_modifiers) { |
| 1776 if (!GetWebWidget()) | 1784 if (!GetWebWidget()) |
| 1777 return; | 1785 return; |
| 1778 | 1786 |
| 1779 DCHECK(GetWebWidget()->IsWebFrameWidget()); | 1787 DCHECK(GetWebWidget()->IsWebFrameWidget()); |
| (...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2372 // browser side (https://crbug.com/669219). | 2380 // browser side (https://crbug.com/669219). |
| 2373 // If there is no WebFrameWidget, then there will be no | 2381 // If there is no WebFrameWidget, then there will be no |
| 2374 // InputMethodControllers for a WebLocalFrame. | 2382 // InputMethodControllers for a WebLocalFrame. |
| 2375 return nullptr; | 2383 return nullptr; |
| 2376 } | 2384 } |
| 2377 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) | 2385 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) |
| 2378 ->GetActiveWebInputMethodController(); | 2386 ->GetActiveWebInputMethodController(); |
| 2379 } | 2387 } |
| 2380 | 2388 |
| 2381 } // namespace content | 2389 } // namespace content |
| OLD | NEW |