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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index a05ca82276102e673b9d897ca11374b9f6b5f14c..09ff47dbc6f69f6d746b6d00fa7bd71b78dec8bd 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -630,6 +630,7 @@ bool RenderWidget::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects)
IPC_MESSAGE_HANDLER(ViewMsg_SetViewportIntersection,
OnSetViewportIntersection)
+ IPC_MESSAGE_HANDLER(ViewMsg_SetIsInert, OnSetIsInert)
IPC_MESSAGE_HANDLER(ViewMsg_WaitForNextFrameForTests,
OnWaitNextFrameForTests)
IPC_MESSAGE_HANDLER(InputMsg_RequestCompositionUpdates,
@@ -1757,6 +1758,13 @@ void RenderWidget::OnSetViewportIntersection(
}
}
+void RenderWidget::OnSetIsInert(bool inert) {
+ if (GetWebWidget() && GetWebWidget()->IsWebFrameWidget()) {
+ DCHECK(popup_type_ == WebPopupType::kWebPopupTypeNone);
+ static_cast<WebFrameWidget*>(GetWebWidget())->SetIsInert(inert);
+ }
+}
+
void RenderWidget::OnDragTargetDragEnter(
const std::vector<DropData::Metadata>& drop_meta_data,
const gfx::Point& client_point,

Powered by Google App Engine
This is Rietveld 408576698