Index: content/renderer/render_view_impl.cc |
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc |
index 9544dad2c9917564839e0132361c33248c429ba1..6e222dae0c7cc1bc43d707b29377d73a0216878d 100644 |
--- a/content/renderer/render_view_impl.cc |
+++ b/content/renderer/render_view_impl.cc |
@@ -647,6 +647,7 @@ RenderViewImpl::RenderViewImpl(RenderViewImplParams* params) |
history_list_length_(0), |
frames_in_progress_(0), |
target_url_status_(TARGET_NONE), |
+ uses_temporary_zoom_level_(false), |
#if defined(OS_ANDROID) |
top_controls_constraints_(cc::BOTH), |
#endif |
@@ -673,8 +674,7 @@ RenderViewImpl::RenderViewImpl(RenderViewImplParams* params) |
#endif |
enumeration_completion_id_(0), |
session_storage_namespace_id_(params->session_storage_namespace_id), |
- next_snapshot_id_(0) { |
-} |
+ next_snapshot_id_(0) {} |
jam
2014/06/12 21:35:52
i believe this is something that is supposed to be
wjmaclean
2014/06/13 16:00:17
Done.
|
void RenderViewImpl::Initialize(RenderViewImplParams* params) { |
routing_id_ = params->routing_id; |
@@ -1077,6 +1077,8 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) { |
IPC_MESSAGE_HANDLER(ViewMsg_Zoom, OnZoom) |
IPC_MESSAGE_HANDLER(ViewMsg_SetZoomLevelForLoadingURL, |
OnSetZoomLevelForLoadingURL) |
+ IPC_MESSAGE_HANDLER(ViewMsg_SetZoomLevelForView, |
+ OnSetZoomLevelForView) |
IPC_MESSAGE_HANDLER(ViewMsg_SetPageEncoding, OnSetPageEncoding) |
IPC_MESSAGE_HANDLER(ViewMsg_ResetPageEncodingToDefault, |
OnResetPageEncodingToDefault) |
@@ -2640,6 +2642,14 @@ void RenderViewImpl::OnSetZoomLevelForLoadingURL(const GURL& url, |
#endif |
} |
+void RenderViewImpl::OnSetZoomLevelForView(bool uses_temporary_zoom_level, |
+ double level) { |
+ uses_temporary_zoom_level_ = uses_temporary_zoom_level; |
+ |
+ webview()->hidePopups(); |
+ webview()->setZoomLevel(level); |
+} |
+ |
void RenderViewImpl::OnSetPageEncoding(const std::string& encoding_name) { |
webview()->setPageEncoding(WebString::fromUTF8(encoding_name)); |
} |