| OLD | NEW |
| 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 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1103 // This zoom level was merely recorded transiently for this load. We can | 1103 // This zoom level was merely recorded transiently for this load. We can |
| 1104 // erase it now. If at some point we reload this page, the browser will | 1104 // erase it now. If at some point we reload this page, the browser will |
| 1105 // send us a new, up-to-date zoom level. | 1105 // send us a new, up-to-date zoom level. |
| 1106 host_zoom_levels_.erase(host_zoom); | 1106 host_zoom_levels_.erase(host_zoom); |
| 1107 } | 1107 } |
| 1108 | 1108 |
| 1109 // Reset the zoom limits in case a plugin had changed them previously. This | 1109 // Reset the zoom limits in case a plugin had changed them previously. This |
| 1110 // will also call us back which will cause us to send a message to | 1110 // will also call us back which will cause us to send a message to |
| 1111 // update TabContents. | 1111 // update TabContents. |
| 1112 webview()->zoomLimitsChanged( | 1112 webview()->zoomLimitsChanged( |
| 1113 WebView::zoomFactorToZoomLevel(WebView::minTextSizeMultiplier), | 1113 WebView::zoomFactorToZoomLevel(content::kMinimumZoomFactor), |
| 1114 WebView::zoomFactorToZoomLevel(WebView::maxTextSizeMultiplier)); | 1114 WebView::zoomFactorToZoomLevel(content::kMaximumZoomFactor)); |
| 1115 | 1115 |
| 1116 // Update contents MIME type for main frame. | 1116 // Update contents MIME type for main frame. |
| 1117 params.contents_mime_type = ds->response().mimeType().utf8(); | 1117 params.contents_mime_type = ds->response().mimeType().utf8(); |
| 1118 | 1118 |
| 1119 params.transition = navigation_state->transition_type(); | 1119 params.transition = navigation_state->transition_type(); |
| 1120 if (!content::PageTransitionIsMainFrame(params.transition)) { | 1120 if (!content::PageTransitionIsMainFrame(params.transition)) { |
| 1121 // If the main frame does a load, it should not be reported as a subframe | 1121 // If the main frame does a load, it should not be reported as a subframe |
| 1122 // navigation. This can occur in the following case: | 1122 // navigation. This can occur in the following case: |
| 1123 // 1. You're on a site with frames. | 1123 // 1. You're on a site with frames. |
| 1124 // 2. You do a subframe navigation. This is stored with transition type | 1124 // 2. You do a subframe navigation. This is stored with transition type |
| (...skipping 3603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4728 return !!RenderThreadImpl::current()->compositor_thread(); | 4728 return !!RenderThreadImpl::current()->compositor_thread(); |
| 4729 } | 4729 } |
| 4730 | 4730 |
| 4731 void RenderViewImpl::OnJavaBridgeInit( | 4731 void RenderViewImpl::OnJavaBridgeInit( |
| 4732 const IPC::ChannelHandle& channel_handle) { | 4732 const IPC::ChannelHandle& channel_handle) { |
| 4733 DCHECK(!java_bridge_dispatcher_.get()); | 4733 DCHECK(!java_bridge_dispatcher_.get()); |
| 4734 #if defined(ENABLE_JAVA_BRIDGE) | 4734 #if defined(ENABLE_JAVA_BRIDGE) |
| 4735 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this, channel_handle)); | 4735 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this, channel_handle)); |
| 4736 #endif | 4736 #endif |
| 4737 } | 4737 } |
| OLD | NEW |