diff options
Diffstat (limited to 'src/core/web_contents_delegate_qt.cpp')
-rw-r--r-- | src/core/web_contents_delegate_qt.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp index aae7f4a43..7f3ced8aa 100644 --- a/src/core/web_contents_delegate_qt.cpp +++ b/src/core/web_contents_delegate_qt.cpp @@ -527,6 +527,17 @@ void WebContentsDelegateQt::ActivateContents(content::WebContents* contents) contents->Focus(); } +void WebContentsDelegateQt::RenderViewHostChanged(content::RenderViewHost *old_host, content::RenderViewHost *new_host) +{ + Q_ASSERT(new_host); + + // The old RVH can be nullptr if it was shut down. + if (!old_host) + return; + + new_host->UpdateWebkitPreferences(old_host->GetWebkitPreferences()); +} + void WebContentsDelegateQt::RequestToLockMouse(content::WebContents *web_contents, bool user_gesture, bool last_unlocked_by_target) { Q_UNUSED(user_gesture); |