diff options
Diffstat (limited to 'src/core/web_contents_adapter.cpp')
-rw-r--r-- | src/core/web_contents_adapter.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp index c09fc362a..f3caa7478 100644 --- a/src/core/web_contents_adapter.cpp +++ b/src/core/web_contents_adapter.cpp @@ -49,6 +49,7 @@ #include "web_engine_context.h" #include "base/values.h" +#include "content/browser/renderer_host/render_view_host_impl.h" #include "content/public/browser/navigation_entry.h" #include "content/public/browser/render_view_host.h" #include "content/public/browser/web_contents.h" @@ -344,3 +345,13 @@ void WebContentsAdapter::runJavaScript(const QString &javaScript, const QString rvh->ExecuteJavascriptInWebFrameCallbackResult(toString16(xPath), toString16(javaScript), callback); } } + +void WebContentsAdapter::dpiScaleChanged() +{ + Q_D(WebContentsAdapter); + content::RenderWidgetHostImpl* impl = NULL; + if (d->webContents->GetRenderViewHost()) + impl = content::RenderWidgetHostImpl::From(d->webContents->GetRenderViewHost()); + if (impl) + impl->NotifyScreenInfoChanged(); +} |