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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 8477033: Updated render_view_impl to use setPageScaleFactor instead of scalePage. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed diff Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 3575 matching lines...) Expand 10 before | Expand all | Expand 10 after
3586 3586
3587 double old_page_scale_factor = webview()->pageScaleFactor(); 3587 double old_page_scale_factor = webview()->pageScaleFactor();
3588 double page_scale_factor; 3588 double page_scale_factor;
3589 if (zoom == content::PAGE_ZOOM_RESET) { 3589 if (zoom == content::PAGE_ZOOM_RESET) {
3590 page_scale_factor = 1.0; 3590 page_scale_factor = 1.0;
3591 } else { 3591 } else {
3592 page_scale_factor = old_page_scale_factor + 3592 page_scale_factor = old_page_scale_factor +
3593 (zoom > 0 ? scaling_increment : -scaling_increment); 3593 (zoom > 0 ? scaling_increment : -scaling_increment);
3594 } 3594 }
3595 if (page_scale_factor > 0) { 3595 if (page_scale_factor > 0) {
3596 webview()->scalePage(page_scale_factor, 3596 webview()->setPageScaleFactor(page_scale_factor,
3597 WebPoint(zoom_center_x, zoom_center_y)); 3597 WebPoint(zoom_center_x, zoom_center_y));
3598 } 3598 }
3599 } 3599 }
3600 3600
3601 void RenderViewImpl::OnSetZoomLevel(double zoom_level) { 3601 void RenderViewImpl::OnSetZoomLevel(double zoom_level) {
3602 // Don't set zoom level for full-page plugin since they don't use the same 3602 // Don't set zoom level for full-page plugin since they don't use the same
3603 // zoom settings. 3603 // zoom settings.
3604 if (webview()->mainFrame()->document().isPluginDocument()) 3604 if (webview()->mainFrame()->document().isPluginDocument())
3605 return; 3605 return;
3606 3606
3607 webview()->hidePopups(); 3607 webview()->hidePopups();
(...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after
4704 return webview()->settings()->useThreadedCompositor(); 4704 return webview()->settings()->useThreadedCompositor();
4705 } 4705 }
4706 4706
4707 void RenderViewImpl::OnJavaBridgeInit( 4707 void RenderViewImpl::OnJavaBridgeInit(
4708 const IPC::ChannelHandle& channel_handle) { 4708 const IPC::ChannelHandle& channel_handle) {
4709 DCHECK(!java_bridge_dispatcher_.get()); 4709 DCHECK(!java_bridge_dispatcher_.get());
4710 #if defined(ENABLE_JAVA_BRIDGE) 4710 #if defined(ENABLE_JAVA_BRIDGE)
4711 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this, channel_handle)); 4711 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this, channel_handle));
4712 #endif 4712 #endif
4713 } 4713 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698