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

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: Trying to fix patch application problem Created 3 years, 7 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 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 IPC_MESSAGE_HANDLER(ViewMsg_DisableDeviceEmulation, 622 IPC_MESSAGE_HANDLER(ViewMsg_DisableDeviceEmulation,
623 OnDisableDeviceEmulation) 623 OnDisableDeviceEmulation)
624 IPC_MESSAGE_HANDLER(ViewMsg_WasHidden, OnWasHidden) 624 IPC_MESSAGE_HANDLER(ViewMsg_WasHidden, OnWasHidden)
625 IPC_MESSAGE_HANDLER(ViewMsg_WasShown, OnWasShown) 625 IPC_MESSAGE_HANDLER(ViewMsg_WasShown, OnWasShown)
626 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnRepaint) 626 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnRepaint)
627 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection) 627 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection)
628 IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck) 628 IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck)
629 IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects) 629 IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects)
630 IPC_MESSAGE_HANDLER(ViewMsg_SetViewportIntersection, 630 IPC_MESSAGE_HANDLER(ViewMsg_SetViewportIntersection,
631 OnSetViewportIntersection) 631 OnSetViewportIntersection)
632 IPC_MESSAGE_HANDLER(ViewMsg_SetIsInert, OnSetIsInert)
632 IPC_MESSAGE_HANDLER(ViewMsg_WaitForNextFrameForTests, 633 IPC_MESSAGE_HANDLER(ViewMsg_WaitForNextFrameForTests,
633 OnWaitNextFrameForTests) 634 OnWaitNextFrameForTests)
634 IPC_MESSAGE_HANDLER(InputMsg_RequestCompositionUpdates, 635 IPC_MESSAGE_HANDLER(InputMsg_RequestCompositionUpdates,
635 OnRequestCompositionUpdates) 636 OnRequestCompositionUpdates)
636 IPC_MESSAGE_HANDLER(DragMsg_TargetDragEnter, OnDragTargetDragEnter) 637 IPC_MESSAGE_HANDLER(DragMsg_TargetDragEnter, OnDragTargetDragEnter)
637 IPC_MESSAGE_HANDLER(DragMsg_TargetDragOver, OnDragTargetDragOver) 638 IPC_MESSAGE_HANDLER(DragMsg_TargetDragOver, OnDragTargetDragOver)
638 IPC_MESSAGE_HANDLER(DragMsg_TargetDragLeave, OnDragTargetDragLeave) 639 IPC_MESSAGE_HANDLER(DragMsg_TargetDragLeave, OnDragTargetDragLeave)
639 IPC_MESSAGE_HANDLER(DragMsg_TargetDrop, OnDragTargetDrop) 640 IPC_MESSAGE_HANDLER(DragMsg_TargetDrop, OnDragTargetDrop)
640 IPC_MESSAGE_HANDLER(DragMsg_SourceEnded, OnDragSourceEnded) 641 IPC_MESSAGE_HANDLER(DragMsg_SourceEnded, OnDragSourceEnded)
641 IPC_MESSAGE_HANDLER(DragMsg_SourceSystemDragEnded, 642 IPC_MESSAGE_HANDLER(DragMsg_SourceSystemDragEnded,
(...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after
1732 1733
1733 void RenderWidget::OnSetViewportIntersection( 1734 void RenderWidget::OnSetViewportIntersection(
1734 const gfx::Rect& viewport_intersection) { 1735 const gfx::Rect& viewport_intersection) {
1735 if (GetWebWidget() && GetWebWidget()->IsWebFrameWidget()) { 1736 if (GetWebWidget() && GetWebWidget()->IsWebFrameWidget()) {
1736 DCHECK(popup_type_ == WebPopupType::kWebPopupTypeNone); 1737 DCHECK(popup_type_ == WebPopupType::kWebPopupTypeNone);
1737 static_cast<WebFrameWidget*>(GetWebWidget()) 1738 static_cast<WebFrameWidget*>(GetWebWidget())
1738 ->SetRemoteViewportIntersection(viewport_intersection); 1739 ->SetRemoteViewportIntersection(viewport_intersection);
1739 } 1740 }
1740 } 1741 }
1741 1742
1743 void RenderWidget::OnSetIsInert(bool inert) {
1744 if (GetWebWidget() && GetWebWidget()->IsWebFrameWidget()) {
1745 DCHECK(popup_type_ == WebPopupType::kWebPopupTypeNone);
1746 static_cast<WebFrameWidget*>(GetWebWidget())->SetIsInert(inert);
1747 }
1748 }
1749
1742 void RenderWidget::OnDragTargetDragEnter( 1750 void RenderWidget::OnDragTargetDragEnter(
1743 const std::vector<DropData::Metadata>& drop_meta_data, 1751 const std::vector<DropData::Metadata>& drop_meta_data,
1744 const gfx::Point& client_point, 1752 const gfx::Point& client_point,
1745 const gfx::Point& screen_point, 1753 const gfx::Point& screen_point,
1746 WebDragOperationsMask ops, 1754 WebDragOperationsMask ops,
1747 int key_modifiers) { 1755 int key_modifiers) {
1748 if (!GetWebWidget()) 1756 if (!GetWebWidget())
1749 return; 1757 return;
1750 1758
1751 DCHECK(GetWebWidget()->IsWebFrameWidget()); 1759 DCHECK(GetWebWidget()->IsWebFrameWidget());
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
2340 // browser side (https://crbug.com/669219). 2348 // browser side (https://crbug.com/669219).
2341 // If there is no WebFrameWidget, then there will be no 2349 // If there is no WebFrameWidget, then there will be no
2342 // InputMethodControllers for a WebLocalFrame. 2350 // InputMethodControllers for a WebLocalFrame.
2343 return nullptr; 2351 return nullptr;
2344 } 2352 }
2345 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) 2353 return static_cast<blink::WebFrameWidget*>(GetWebWidget())
2346 ->GetActiveWebInputMethodController(); 2354 ->GetActiveWebInputMethodController();
2347 } 2355 }
2348 2356
2349 } // namespace content 2357 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698