OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1257 | 1257 |
1258 if (host_zoom != host_zoom_levels_.end()) { | 1258 if (host_zoom != host_zoom_levels_.end()) { |
1259 // This zoom level was merely recorded transiently for this load. We can | 1259 // This zoom level was merely recorded transiently for this load. We can |
1260 // erase it now. If at some point we reload this page, the browser will | 1260 // erase it now. If at some point we reload this page, the browser will |
1261 // send us a new, up-to-date zoom level. | 1261 // send us a new, up-to-date zoom level. |
1262 host_zoom_levels_.erase(host_zoom); | 1262 host_zoom_levels_.erase(host_zoom); |
1263 } | 1263 } |
1264 | 1264 |
1265 // Reset the zoom limits in case a plugin had changed them previously. This | 1265 // Reset the zoom limits in case a plugin had changed them previously. This |
1266 // will also call us back which will cause us to send a message to | 1266 // will also call us back which will cause us to send a message to |
1267 // update TabContents. | 1267 // update WebContentsImpl. |
1268 webview()->zoomLimitsChanged( | 1268 webview()->zoomLimitsChanged( |
1269 WebView::zoomFactorToZoomLevel(content::kMinimumZoomFactor), | 1269 WebView::zoomFactorToZoomLevel(content::kMinimumZoomFactor), |
1270 WebView::zoomFactorToZoomLevel(content::kMaximumZoomFactor)); | 1270 WebView::zoomFactorToZoomLevel(content::kMaximumZoomFactor)); |
1271 | 1271 |
1272 // Update contents MIME type for main frame. | 1272 // Update contents MIME type for main frame. |
1273 params.contents_mime_type = ds->response().mimeType().utf8(); | 1273 params.contents_mime_type = ds->response().mimeType().utf8(); |
1274 | 1274 |
1275 params.transition = navigation_state->transition_type(); | 1275 params.transition = navigation_state->transition_type(); |
1276 if (!content::PageTransitionIsMainFrame(params.transition)) { | 1276 if (!content::PageTransitionIsMainFrame(params.transition)) { |
1277 // If the main frame does a load, it should not be reported as a subframe | 1277 // If the main frame does a load, it should not be reported as a subframe |
(...skipping 3975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5253 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5253 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
5254 return !!RenderThreadImpl::current()->compositor_thread(); | 5254 return !!RenderThreadImpl::current()->compositor_thread(); |
5255 } | 5255 } |
5256 | 5256 |
5257 void RenderViewImpl::OnJavaBridgeInit() { | 5257 void RenderViewImpl::OnJavaBridgeInit() { |
5258 DCHECK(!java_bridge_dispatcher_.get()); | 5258 DCHECK(!java_bridge_dispatcher_.get()); |
5259 #if defined(ENABLE_JAVA_BRIDGE) | 5259 #if defined(ENABLE_JAVA_BRIDGE) |
5260 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); | 5260 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); |
5261 #endif | 5261 #endif |
5262 } | 5262 } |
OLD | NEW |