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

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

Issue 8528011: Page zoom improvements (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
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 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1127 // This zoom level was merely recorded transiently for this load. We can 1127 // This zoom level was merely recorded transiently for this load. We can
1128 // erase it now. If at some point we reload this page, the browser will 1128 // erase it now. If at some point we reload this page, the browser will
1129 // send us a new, up-to-date zoom level. 1129 // send us a new, up-to-date zoom level.
1130 host_zoom_levels_.erase(host_zoom); 1130 host_zoom_levels_.erase(host_zoom);
1131 } 1131 }
1132 1132
1133 // Reset the zoom limits in case a plugin had changed them previously. This 1133 // Reset the zoom limits in case a plugin had changed them previously. This
1134 // will also call us back which will cause us to send a message to 1134 // will also call us back which will cause us to send a message to
1135 // update TabContents. 1135 // update TabContents.
1136 webview()->zoomLimitsChanged( 1136 webview()->zoomLimitsChanged(
1137 WebView::zoomFactorToZoomLevel(WebView::minTextSizeMultiplier), 1137 WebView::zoomFactorToZoomLevel(content::kMinimumZoomFactor),
1138 WebView::zoomFactorToZoomLevel(WebView::maxTextSizeMultiplier)); 1138 WebView::zoomFactorToZoomLevel(content::kMaximumZoomFactor));
1139 1139
1140 // Update contents MIME type for main frame. 1140 // Update contents MIME type for main frame.
1141 params.contents_mime_type = ds->response().mimeType().utf8(); 1141 params.contents_mime_type = ds->response().mimeType().utf8();
1142 1142
1143 params.transition = navigation_state->transition_type(); 1143 params.transition = navigation_state->transition_type();
1144 if (!content::PageTransitionIsMainFrame(params.transition)) { 1144 if (!content::PageTransitionIsMainFrame(params.transition)) {
1145 // If the main frame does a load, it should not be reported as a subframe 1145 // If the main frame does a load, it should not be reported as a subframe
1146 // navigation. This can occur in the following case: 1146 // navigation. This can occur in the following case:
1147 // 1. You're on a site with frames. 1147 // 1. You're on a site with frames.
1148 // 2. You do a subframe navigation. This is stored with transition type 1148 // 2. You do a subframe navigation. This is stored with transition type
(...skipping 3555 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
« content/public/common/page_zoom.cc ('K') | « content/public/common/page_zoom.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698