| Index: content/browser/web_contents/web_contents_impl.cc
|
| diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
| index 23a03d9b75fac5e2fd7bb91fa7001bfe8296fbcc..b25739fe858cb8b82756c8144e8e83a4191332be 100644
|
| --- a/content/browser/web_contents/web_contents_impl.cc
|
| +++ b/content/browser/web_contents/web_contents_impl.cc
|
| @@ -970,6 +970,23 @@ void WebContentsImpl::UpdateZoomIfNecessary(const std::string& scheme,
|
| UpdateZoom(level);
|
| }
|
|
|
| +void WebContentsImpl::UpdateDeviceScaleFactor(double device_scale_factor) {
|
| + SendPageMessage(
|
| + new PageMsg_SetDeviceScaleFactor(MSG_ROUTING_NONE, device_scale_factor));
|
| +}
|
| +
|
| +double WebContentsImpl::DefaultDeviceScaleFactor() {
|
| + // TODO(wjmaclean): is it simpler to just remember the value from the last
|
| + // call to UpdateDeviceScaleFactor()? It's perhaps not the sort of state we
|
| + // expect WebContents to be hanging on to.
|
| + RenderWidgetHostViewBase* rwhv =
|
| + static_cast<RenderWidgetHostViewBase*>(GetRenderWidgetHostView());
|
| + if (rwhv)
|
| + return rwhv->current_device_scale_factor();
|
| +
|
| + return RenderWidgetHostDelegate::DefaultDeviceScaleFactor();
|
| +}
|
| +
|
| WebUI* WebContentsImpl::CreateSubframeWebUI(const GURL& url,
|
| const std::string& frame_name) {
|
| DCHECK(!frame_name.empty());
|
|
|