| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 4465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4476 HostZoomLevels::iterator host_zoom = | 4476 HostZoomLevels::iterator host_zoom = |
| 4477 render_view_->host_zoom_levels_.find(GURL(request.url())); | 4477 render_view_->host_zoom_levels_.find(GURL(request.url())); |
| 4478 if (render_view_->webview()->mainFrame()->isWebLocalFrame() && | 4478 if (render_view_->webview()->mainFrame()->isWebLocalFrame() && |
| 4479 render_view_->webview()->mainFrame()->document().isPluginDocument()) { | 4479 render_view_->webview()->mainFrame()->document().isPluginDocument()) { |
| 4480 // Reset the zoom levels for plugins. | 4480 // Reset the zoom levels for plugins. |
| 4481 render_view_->webview()->setZoomLevel(0); | 4481 render_view_->webview()->setZoomLevel(0); |
| 4482 } else { | 4482 } else { |
| 4483 // If the zoom level is not found, then do nothing. In-page navigation | 4483 // If the zoom level is not found, then do nothing. In-page navigation |
| 4484 // relies on not changing the zoom level in this case. | 4484 // relies on not changing the zoom level in this case. |
| 4485 if (host_zoom != render_view_->host_zoom_levels_.end()) | 4485 if (host_zoom != render_view_->host_zoom_levels_.end()) |
| 4486 render_view_->webview()->setZoomLevel(host_zoom->second); | 4486 render_view_->SetZoomLevel(host_zoom->second); |
| 4487 } | 4487 } |
| 4488 | 4488 |
| 4489 if (host_zoom != render_view_->host_zoom_levels_.end()) { | 4489 if (host_zoom != render_view_->host_zoom_levels_.end()) { |
| 4490 // This zoom level was merely recorded transiently for this load. We can | 4490 // This zoom level was merely recorded transiently for this load. We can |
| 4491 // erase it now. If at some point we reload this page, the browser will | 4491 // erase it now. If at some point we reload this page, the browser will |
| 4492 // send us a new, up-to-date zoom level. | 4492 // send us a new, up-to-date zoom level. |
| 4493 render_view_->host_zoom_levels_.erase(host_zoom); | 4493 render_view_->host_zoom_levels_.erase(host_zoom); |
| 4494 } | 4494 } |
| 4495 | 4495 |
| 4496 // Update contents MIME type for main frame. | 4496 // Update contents MIME type for main frame. |
| (...skipping 1530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6027 int match_count, | 6027 int match_count, |
| 6028 int ordinal, | 6028 int ordinal, |
| 6029 const WebRect& selection_rect, | 6029 const WebRect& selection_rect, |
| 6030 bool final_status_update) { | 6030 bool final_status_update) { |
| 6031 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, | 6031 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, |
| 6032 selection_rect, ordinal, | 6032 selection_rect, ordinal, |
| 6033 final_status_update)); | 6033 final_status_update)); |
| 6034 } | 6034 } |
| 6035 | 6035 |
| 6036 } // namespace content | 6036 } // namespace content |
| OLD | NEW |