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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 393133002: Migrate HostZoomMap to live in StoragePartition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Perhaps HostZoomLevelContextDeleter was needed after all ... Created 6 years, 1 month 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
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/browser/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 } 1075 }
1076 1076
1077 void RenderViewHostImpl::OnDocumentAvailableInMainFrame( 1077 void RenderViewHostImpl::OnDocumentAvailableInMainFrame(
1078 bool uses_temporary_zoom_level) { 1078 bool uses_temporary_zoom_level) {
1079 delegate_->DocumentAvailableInMainFrame(this); 1079 delegate_->DocumentAvailableInMainFrame(this);
1080 1080
1081 if (!uses_temporary_zoom_level) 1081 if (!uses_temporary_zoom_level)
1082 return; 1082 return;
1083 1083
1084 HostZoomMapImpl* host_zoom_map = 1084 HostZoomMapImpl* host_zoom_map =
1085 static_cast<HostZoomMapImpl*>(HostZoomMap::GetDefaultForBrowserContext( 1085 static_cast<HostZoomMapImpl*>(HostZoomMap::Get(GetSiteInstance()));
1086 GetProcess()->GetBrowserContext()));
1087 host_zoom_map->SetTemporaryZoomLevel(GetProcess()->GetID(), 1086 host_zoom_map->SetTemporaryZoomLevel(GetProcess()->GetID(),
1088 GetRoutingID(), 1087 GetRoutingID(),
1089 host_zoom_map->GetDefaultZoomLevel()); 1088 host_zoom_map->GetDefaultZoomLevel());
1090 } 1089 }
1091 1090
1092 void RenderViewHostImpl::OnToggleFullscreen(bool enter_fullscreen) { 1091 void RenderViewHostImpl::OnToggleFullscreen(bool enter_fullscreen) {
1093 DCHECK_CURRENTLY_ON(BrowserThread::UI); 1092 DCHECK_CURRENTLY_ON(BrowserThread::UI);
1094 delegate_->ToggleFullscreenMode(enter_fullscreen); 1093 delegate_->ToggleFullscreenMode(enter_fullscreen);
1095 // We need to notify the contents that its fullscreen state has changed. This 1094 // We need to notify the contents that its fullscreen state has changed. This
1096 // is done as part of the resize message. 1095 // is done as part of the resize message.
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
1390 Send(new ViewMsg_PluginActionAt(GetRoutingID(), location, action)); 1389 Send(new ViewMsg_PluginActionAt(GetRoutingID(), location, action));
1391 } 1390 }
1392 1391
1393 void RenderViewHostImpl::NotifyMoveOrResizeStarted() { 1392 void RenderViewHostImpl::NotifyMoveOrResizeStarted() {
1394 Send(new ViewMsg_MoveOrResizeStarted(GetRoutingID())); 1393 Send(new ViewMsg_MoveOrResizeStarted(GetRoutingID()));
1395 } 1394 }
1396 1395
1397 void RenderViewHostImpl::OnDidZoomURL(double zoom_level, 1396 void RenderViewHostImpl::OnDidZoomURL(double zoom_level,
1398 const GURL& url) { 1397 const GURL& url) {
1399 HostZoomMapImpl* host_zoom_map = 1398 HostZoomMapImpl* host_zoom_map =
1400 static_cast<HostZoomMapImpl*>(HostZoomMap::GetDefaultForBrowserContext( 1399 static_cast<HostZoomMapImpl*>(HostZoomMap::Get(GetSiteInstance()));
1401 GetProcess()->GetBrowserContext()));
1402 1400
1403 host_zoom_map->SetZoomLevelForView(GetProcess()->GetID(), 1401 host_zoom_map->SetZoomLevelForView(GetProcess()->GetID(),
1404 GetRoutingID(), 1402 GetRoutingID(),
1405 zoom_level, 1403 zoom_level,
1406 net::GetHostOrSpecFromURL(url)); 1404 net::GetHostOrSpecFromURL(url));
1407 } 1405 }
1408 1406
1409 void RenderViewHostImpl::OnRunFileChooser(const FileChooserParams& params) { 1407 void RenderViewHostImpl::OnRunFileChooser(const FileChooserParams& params) {
1410 delegate_->RunFileChooser(this, params); 1408 delegate_->RunFileChooser(this, params);
1411 } 1409 }
(...skipping 27 matching lines...) Expand all
1439 FrameTree* frame_tree = delegate_->GetFrameTree(); 1437 FrameTree* frame_tree = delegate_->GetFrameTree();
1440 1438
1441 frame_tree->ResetForMainFrameSwap(); 1439 frame_tree->ResetForMainFrameSwap();
1442 } 1440 }
1443 1441
1444 void RenderViewHostImpl::SelectWordAroundCaret() { 1442 void RenderViewHostImpl::SelectWordAroundCaret() {
1445 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); 1443 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID()));
1446 } 1444 }
1447 1445
1448 } // namespace content 1446 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698