Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1114)

Unified Diff: content/renderer/render_view_impl.cc

Issue 302603012: Zoom Extension API (content changes) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« content/common/view_messages.h ('K') | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index b6542ffbd6a27e3a63ea96e4858bb8f0a758a83b..207d6db585769e8c11a2037e668cbd06f9808fc4 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -675,8 +675,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) {}
void RenderViewImpl::Initialize(RenderViewImplParams* params) {
routing_id_ = params->routing_id;
@@ -1079,6 +1078,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)
@@ -2658,6 +2659,11 @@ void RenderViewImpl::OnSetZoomLevelForLoadingURL(const GURL& url,
#endif
}
+void RenderViewImpl::OnSetZoomLevelForView(double level) {
+ webview()->hidePopups();
+ webview()->setZoomLevel(level);
+}
+
void RenderViewImpl::OnSetPageEncoding(const std::string& encoding_name) {
webview()->setPageEncoding(WebString::fromUTF8(encoding_name));
}
« content/common/view_messages.h ('K') | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698