Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: content/renderer/render_widget.cc

Issue 2883033003: Propagate inert state to OOPIFs when a modal dialog is active (Closed)
Patch Set: alexmos comments addressed Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 IPC_MESSAGE_HANDLER(ViewMsg_DisableDeviceEmulation, 623 IPC_MESSAGE_HANDLER(ViewMsg_DisableDeviceEmulation,
624 OnDisableDeviceEmulation) 624 OnDisableDeviceEmulation)
625 IPC_MESSAGE_HANDLER(ViewMsg_WasHidden, OnWasHidden) 625 IPC_MESSAGE_HANDLER(ViewMsg_WasHidden, OnWasHidden)
626 IPC_MESSAGE_HANDLER(ViewMsg_WasShown, OnWasShown) 626 IPC_MESSAGE_HANDLER(ViewMsg_WasShown, OnWasShown)
627 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnRepaint) 627 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnRepaint)
628 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection) 628 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection)
629 IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck) 629 IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck)
630 IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects) 630 IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects)
631 IPC_MESSAGE_HANDLER(ViewMsg_SetViewportIntersection, 631 IPC_MESSAGE_HANDLER(ViewMsg_SetViewportIntersection,
632 OnSetViewportIntersection) 632 OnSetViewportIntersection)
633 IPC_MESSAGE_HANDLER(ViewMsg_SetIsInert, OnSetIsInert)
633 IPC_MESSAGE_HANDLER(ViewMsg_WaitForNextFrameForTests, 634 IPC_MESSAGE_HANDLER(ViewMsg_WaitForNextFrameForTests,
634 OnWaitNextFrameForTests) 635 OnWaitNextFrameForTests)
635 IPC_MESSAGE_HANDLER(InputMsg_RequestCompositionUpdates, 636 IPC_MESSAGE_HANDLER(InputMsg_RequestCompositionUpdates,
636 OnRequestCompositionUpdates) 637 OnRequestCompositionUpdates)
637 IPC_MESSAGE_HANDLER(DragMsg_TargetDragEnter, OnDragTargetDragEnter) 638 IPC_MESSAGE_HANDLER(DragMsg_TargetDragEnter, OnDragTargetDragEnter)
638 IPC_MESSAGE_HANDLER(DragMsg_TargetDragOver, OnDragTargetDragOver) 639 IPC_MESSAGE_HANDLER(DragMsg_TargetDragOver, OnDragTargetDragOver)
639 IPC_MESSAGE_HANDLER(DragMsg_TargetDragLeave, OnDragTargetDragLeave) 640 IPC_MESSAGE_HANDLER(DragMsg_TargetDragLeave, OnDragTargetDragLeave)
640 IPC_MESSAGE_HANDLER(DragMsg_TargetDrop, OnDragTargetDrop) 641 IPC_MESSAGE_HANDLER(DragMsg_TargetDrop, OnDragTargetDrop)
641 IPC_MESSAGE_HANDLER(DragMsg_SourceEnded, OnDragSourceEnded) 642 IPC_MESSAGE_HANDLER(DragMsg_SourceEnded, OnDragSourceEnded)
642 IPC_MESSAGE_HANDLER(DragMsg_SourceSystemDragEnded, 643 IPC_MESSAGE_HANDLER(DragMsg_SourceSystemDragEnded,
(...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after
1750 1751
1751 void RenderWidget::OnSetViewportIntersection( 1752 void RenderWidget::OnSetViewportIntersection(
1752 const gfx::Rect& viewport_intersection) { 1753 const gfx::Rect& viewport_intersection) {
1753 if (GetWebWidget() && GetWebWidget()->IsWebFrameWidget()) { 1754 if (GetWebWidget() && GetWebWidget()->IsWebFrameWidget()) {
1754 DCHECK(popup_type_ == WebPopupType::kWebPopupTypeNone); 1755 DCHECK(popup_type_ == WebPopupType::kWebPopupTypeNone);
1755 static_cast<WebFrameWidget*>(GetWebWidget()) 1756 static_cast<WebFrameWidget*>(GetWebWidget())
1756 ->SetRemoteViewportIntersection(viewport_intersection); 1757 ->SetRemoteViewportIntersection(viewport_intersection);
1757 } 1758 }
1758 } 1759 }
1759 1760
1761 void RenderWidget::OnSetIsInert(bool inert) {
1762 if (GetWebWidget() && GetWebWidget()->IsWebFrameWidget()) {
1763 DCHECK(popup_type_ == WebPopupType::kWebPopupTypeNone);
1764 static_cast<WebFrameWidget*>(GetWebWidget())->SetIsInert(inert);
1765 }
1766 }
1767
1760 void RenderWidget::OnDragTargetDragEnter( 1768 void RenderWidget::OnDragTargetDragEnter(
1761 const std::vector<DropData::Metadata>& drop_meta_data, 1769 const std::vector<DropData::Metadata>& drop_meta_data,
1762 const gfx::Point& client_point, 1770 const gfx::Point& client_point,
1763 const gfx::Point& screen_point, 1771 const gfx::Point& screen_point,
1764 WebDragOperationsMask ops, 1772 WebDragOperationsMask ops,
1765 int key_modifiers) { 1773 int key_modifiers) {
1766 if (!GetWebWidget()) 1774 if (!GetWebWidget())
1767 return; 1775 return;
1768 1776
1769 DCHECK(GetWebWidget()->IsWebFrameWidget()); 1777 DCHECK(GetWebWidget()->IsWebFrameWidget());
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
2363 // browser side (https://crbug.com/669219). 2371 // browser side (https://crbug.com/669219).
2364 // If there is no WebFrameWidget, then there will be no 2372 // If there is no WebFrameWidget, then there will be no
2365 // InputMethodControllers for a WebLocalFrame. 2373 // InputMethodControllers for a WebLocalFrame.
2366 return nullptr; 2374 return nullptr;
2367 } 2375 }
2368 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) 2376 return static_cast<blink::WebFrameWidget*>(GetWebWidget())
2369 ->GetActiveWebInputMethodController(); 2377 ->GetActiveWebInputMethodController();
2370 } 2378 }
2371 2379
2372 } // namespace content 2380 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698