Index: android_webview/renderer/aw_render_view_ext.cc |
diff --git a/android_webview/renderer/aw_render_view_ext.cc b/android_webview/renderer/aw_render_view_ext.cc |
index 2e253ef7b70c5e2f5109faf4b648588a335fd815..27a72420bdeb845a8f1a961092ea3b9cd233abd5 100644 |
--- a/android_webview/renderer/aw_render_view_ext.cc |
+++ b/android_webview/renderer/aw_render_view_ext.cc |
@@ -127,7 +127,7 @@ void PopulateHitTestData(const GURL& absolute_link_url, |
} // namespace |
AwRenderViewExt::AwRenderViewExt(content::RenderView* render_view) |
- : content::RenderViewObserver(render_view) { |
+ : content::RenderViewObserver(render_view), page_scale_factor_(0.0f) { |
render_view->GetWebView()->setPermissionClient(this); |
} |
@@ -192,6 +192,18 @@ void AwRenderViewExt::DidCommitProvisionalLoad(WebKit::WebFrame* frame, |
} |
} |
+void AwRenderViewExt::DidCommitCompositorFrame() { |
+ UpdatePageScaleFactor(); |
+} |
+ |
+void AwRenderViewExt::UpdatePageScaleFactor() { |
+ if (page_scale_factor_ != render_view()->GetWebView()->pageScaleFactor()) { |
+ page_scale_factor_ = render_view()->GetWebView()->pageScaleFactor(); |
+ Send(new AwViewHostMsg_PageScaleFactorChanged(routing_id(), |
+ page_scale_factor_)); |
+ } |
+} |
+ |
void AwRenderViewExt::FocusedNodeChanged(const WebKit::WebNode& node) { |
if (node.isNull() || !node.isElementNode() || !render_view()) |
return; |