diff options
Diffstat (limited to 'content/browser/webui')
-rw-r--r-- | content/browser/webui/web_ui_impl.cc | 5 | ||||
-rw-r--r-- | content/browser/webui/web_ui_impl.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/content/browser/webui/web_ui_impl.cc b/content/browser/webui/web_ui_impl.cc index 1656b98..1050e61 100644 --- a/content/browser/webui/web_ui_impl.cc +++ b/content/browser/webui/web_ui_impl.cc @@ -9,6 +9,7 @@ #include "base/utf_string_conversions.h" #include "base/values.h" #include "content/browser/child_process_security_policy_impl.h" +#include "content/browser/renderer_host/dip_util.h" #include "content/browser/renderer_host/render_process_host_impl.h" #include "content/browser/renderer_host/render_view_host_impl.h" #include "content/browser/web_contents/web_contents_impl.h" @@ -116,6 +117,10 @@ WebContents* WebUIImpl::GetWebContents() const { return web_contents_; } +float WebUIImpl::GetDeviceScale() const { + return GetDIPScaleFactor(web_contents_->GetRenderWidgetHostView()); +} + bool WebUIImpl::ShouldHideFavicon() const { return hide_favicon_; } diff --git a/content/browser/webui/web_ui_impl.h b/content/browser/webui/web_ui_impl.h index d0dfcab..e8f9ea1 100644 --- a/content/browser/webui/web_ui_impl.h +++ b/content/browser/webui/web_ui_impl.h @@ -33,6 +33,7 @@ class CONTENT_EXPORT WebUIImpl : public content::WebUI, virtual content::WebContents* GetWebContents() const OVERRIDE; virtual content::WebUIController* GetController() const OVERRIDE; virtual void SetController(content::WebUIController* controller) OVERRIDE; + virtual float GetDeviceScale() const OVERRIDE; virtual bool ShouldHideFavicon() const OVERRIDE; virtual void HideFavicon() OVERRIDE; virtual bool ShouldFocusLocationBarByDefault() const OVERRIDE; |