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

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

Issue 388583002: Remove RenderViewObserver::ZoomLevelChanged. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months 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 | « content/public/renderer/render_view_observer.h ('k') | 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) 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 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 3922 matching lines...) Expand 10 before | Expand all | Expand 10 after
3933 double maximum_level) { 3933 double maximum_level) {
3934 int minimum_percent = static_cast<int>( 3934 int minimum_percent = static_cast<int>(
3935 ZoomLevelToZoomFactor(minimum_level) * 100); 3935 ZoomLevelToZoomFactor(minimum_level) * 100);
3936 int maximum_percent = static_cast<int>( 3936 int maximum_percent = static_cast<int>(
3937 ZoomLevelToZoomFactor(maximum_level) * 100); 3937 ZoomLevelToZoomFactor(maximum_level) * 100);
3938 3938
3939 Send(new ViewHostMsg_UpdateZoomLimits( 3939 Send(new ViewHostMsg_UpdateZoomLimits(
3940 routing_id_, minimum_percent, maximum_percent)); 3940 routing_id_, minimum_percent, maximum_percent));
3941 } 3941 }
3942 3942
3943 void RenderViewImpl::zoomLevelChanged() { 3943 void RenderViewImpl::zoomLevelChanged() {
Ilya Sherman 2014/07/11 19:19:44 Just to confirm: Is this method still called in so
3944 double zoom_level = webview()->zoomLevel(); 3944 double zoom_level = webview()->zoomLevel();
3945 3945
3946 FOR_EACH_OBSERVER(RenderViewObserver, observers_, ZoomLevelChanged());
3947
3948 // Do not send empty URLs to the browser when we are just setting the default 3946 // Do not send empty URLs to the browser when we are just setting the default
3949 // zoom level (from RendererPreferences) before the first navigation. 3947 // zoom level (from RendererPreferences) before the first navigation.
3950 if (!webview()->mainFrame()->document().url().isEmpty()) { 3948 if (!webview()->mainFrame()->document().url().isEmpty()) {
3951 // Tell the browser which url got zoomed so it can update the menu and the 3949 // Tell the browser which url got zoomed so it can update the menu and the
3952 // saved values if necessary 3950 // saved values if necessary
3953 Send(new ViewHostMsg_DidZoomURL( 3951 Send(new ViewHostMsg_DidZoomURL(
3954 routing_id_, zoom_level, 3952 routing_id_, zoom_level,
3955 GURL(webview()->mainFrame()->document().url()))); 3953 GURL(webview()->mainFrame()->document().url())));
3956 } 3954 }
3957 } 3955 }
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
4297 std::vector<gfx::Size> sizes; 4295 std::vector<gfx::Size> sizes;
4298 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4296 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4299 if (!url.isEmpty()) 4297 if (!url.isEmpty())
4300 urls.push_back( 4298 urls.push_back(
4301 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4299 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4302 } 4300 }
4303 SendUpdateFaviconURL(urls); 4301 SendUpdateFaviconURL(urls);
4304 } 4302 }
4305 4303
4306 } // namespace content 4304 } // namespace content
OLDNEW
« no previous file with comments | « content/public/renderer/render_view_observer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698