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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 287093002: Remove ViewMsg_SetZoomLevel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add std:: namespace to find() to fix Android compile. Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 85052d5873a87b199c40f3085e1378dddbd89acc..6c76df789c655867d1c04973fe40343327c1fbc1 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -1181,8 +1181,14 @@ void RenderViewHostImpl::OnRequestMove(const gfx::Rect& pos) {
Send(new ViewMsg_Move_ACK(GetRoutingID()));
}
-void RenderViewHostImpl::OnDocumentAvailableInMainFrame() {
+void RenderViewHostImpl::OnDocumentAvailableInMainFrame(
+ bool uses_temporary_zoom_level) {
delegate_->DocumentAvailableInMainFrame(this);
+
+ HostZoomMapImpl* host_zoom_map = static_cast<HostZoomMapImpl*>(
+ HostZoomMap::GetForBrowserContext(GetProcess()->GetBrowserContext()));
+ host_zoom_map->SetUsesTemporaryZoomLevel(
+ GetProcess()->GetID(), GetRoutingID(), uses_temporary_zoom_level);
}
void RenderViewHostImpl::OnToggleFullscreen(bool enter_fullscreen) {
@@ -1591,17 +1597,14 @@ void RenderViewHostImpl::OnAccessibilityLocationChanges(
}
void RenderViewHostImpl::OnDidZoomURL(double zoom_level,
- bool remember,
const GURL& url) {
HostZoomMapImpl* host_zoom_map = static_cast<HostZoomMapImpl*>(
HostZoomMap::GetForBrowserContext(GetProcess()->GetBrowserContext()));
- if (remember) {
- host_zoom_map->
- SetZoomLevelForHost(net::GetHostOrSpecFromURL(url), zoom_level);
- } else {
- host_zoom_map->SetTemporaryZoomLevel(
- GetProcess()->GetID(), GetRoutingID(), zoom_level);
- }
+
+ host_zoom_map->SetZoomLevelForView(GetProcess()->GetID(),
+ GetRoutingID(),
+ zoom_level,
+ net::GetHostOrSpecFromURL(url));
}
void RenderViewHostImpl::OnRunFileChooser(const FileChooserParams& params) {
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698