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

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

Issue 506073002: Rename HostZoomMap::GetForBrowserContext() to GetDefaultForBrowserContext(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « content/browser/host_zoom_map_impl.cc ('k') | content/browser/resource_context_impl.cc » ('j') | 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/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 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 Send(new ViewMsg_Move_ACK(GetRoutingID())); 1098 Send(new ViewMsg_Move_ACK(GetRoutingID()));
1099 } 1099 }
1100 1100
1101 void RenderViewHostImpl::OnDocumentAvailableInMainFrame( 1101 void RenderViewHostImpl::OnDocumentAvailableInMainFrame(
1102 bool uses_temporary_zoom_level) { 1102 bool uses_temporary_zoom_level) {
1103 delegate_->DocumentAvailableInMainFrame(this); 1103 delegate_->DocumentAvailableInMainFrame(this);
1104 1104
1105 if (!uses_temporary_zoom_level) 1105 if (!uses_temporary_zoom_level)
1106 return; 1106 return;
1107 1107
1108 HostZoomMapImpl* host_zoom_map = static_cast<HostZoomMapImpl*>( 1108 HostZoomMapImpl* host_zoom_map =
1109 HostZoomMap::GetForBrowserContext(GetProcess()->GetBrowserContext())); 1109 static_cast<HostZoomMapImpl*>(HostZoomMap::GetDefaultForBrowserContext(
1110 GetProcess()->GetBrowserContext()));
1110 host_zoom_map->SetTemporaryZoomLevel(GetProcess()->GetID(), 1111 host_zoom_map->SetTemporaryZoomLevel(GetProcess()->GetID(),
1111 GetRoutingID(), 1112 GetRoutingID(),
1112 host_zoom_map->GetDefaultZoomLevel()); 1113 host_zoom_map->GetDefaultZoomLevel());
1113 } 1114 }
1114 1115
1115 void RenderViewHostImpl::OnToggleFullscreen(bool enter_fullscreen) { 1116 void RenderViewHostImpl::OnToggleFullscreen(bool enter_fullscreen) {
1116 DCHECK_CURRENTLY_ON(BrowserThread::UI); 1117 DCHECK_CURRENTLY_ON(BrowserThread::UI);
1117 delegate_->ToggleFullscreenMode(enter_fullscreen); 1118 delegate_->ToggleFullscreenMode(enter_fullscreen);
1118 // We need to notify the contents that its fullscreen state has changed. This 1119 // We need to notify the contents that its fullscreen state has changed. This
1119 // is done as part of the resize message. 1120 // is done as part of the resize message.
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
1419 const gfx::Point& location, const blink::WebPluginAction& action) { 1420 const gfx::Point& location, const blink::WebPluginAction& action) {
1420 Send(new ViewMsg_PluginActionAt(GetRoutingID(), location, action)); 1421 Send(new ViewMsg_PluginActionAt(GetRoutingID(), location, action));
1421 } 1422 }
1422 1423
1423 void RenderViewHostImpl::NotifyMoveOrResizeStarted() { 1424 void RenderViewHostImpl::NotifyMoveOrResizeStarted() {
1424 Send(new ViewMsg_MoveOrResizeStarted(GetRoutingID())); 1425 Send(new ViewMsg_MoveOrResizeStarted(GetRoutingID()));
1425 } 1426 }
1426 1427
1427 void RenderViewHostImpl::OnDidZoomURL(double zoom_level, 1428 void RenderViewHostImpl::OnDidZoomURL(double zoom_level,
1428 const GURL& url) { 1429 const GURL& url) {
1429 HostZoomMapImpl* host_zoom_map = static_cast<HostZoomMapImpl*>( 1430 HostZoomMapImpl* host_zoom_map =
1430 HostZoomMap::GetForBrowserContext(GetProcess()->GetBrowserContext())); 1431 static_cast<HostZoomMapImpl*>(HostZoomMap::GetDefaultForBrowserContext(
1432 GetProcess()->GetBrowserContext()));
1431 1433
1432 host_zoom_map->SetZoomLevelForView(GetProcess()->GetID(), 1434 host_zoom_map->SetZoomLevelForView(GetProcess()->GetID(),
1433 GetRoutingID(), 1435 GetRoutingID(),
1434 zoom_level, 1436 zoom_level,
1435 net::GetHostOrSpecFromURL(url)); 1437 net::GetHostOrSpecFromURL(url));
1436 } 1438 }
1437 1439
1438 void RenderViewHostImpl::OnRunFileChooser(const FileChooserParams& params) { 1440 void RenderViewHostImpl::OnRunFileChooser(const FileChooserParams& params) {
1439 delegate_->RunFileChooser(this, params); 1441 delegate_->RunFileChooser(this, params);
1440 } 1442 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
1489 FrameTree* frame_tree = delegate_->GetFrameTree(); 1491 FrameTree* frame_tree = delegate_->GetFrameTree();
1490 1492
1491 frame_tree->ResetForMainFrameSwap(); 1493 frame_tree->ResetForMainFrameSwap();
1492 } 1494 }
1493 1495
1494 void RenderViewHostImpl::SelectWordAroundCaret() { 1496 void RenderViewHostImpl::SelectWordAroundCaret() {
1495 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); 1497 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID()));
1496 } 1498 }
1497 1499
1498 } // namespace content 1500 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/host_zoom_map_impl.cc ('k') | content/browser/resource_context_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698