Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1106 Send(new ViewMsg_Move_ACK(GetRoutingID())); | 1106 Send(new ViewMsg_Move_ACK(GetRoutingID())); |
| 1107 } | 1107 } |
| 1108 | 1108 |
| 1109 void RenderViewHostImpl::OnDocumentAvailableInMainFrame( | 1109 void RenderViewHostImpl::OnDocumentAvailableInMainFrame( |
| 1110 bool uses_temporary_zoom_level) { | 1110 bool uses_temporary_zoom_level) { |
| 1111 delegate_->DocumentAvailableInMainFrame(this); | 1111 delegate_->DocumentAvailableInMainFrame(this); |
| 1112 | 1112 |
| 1113 if (!uses_temporary_zoom_level) | 1113 if (!uses_temporary_zoom_level) |
| 1114 return; | 1114 return; |
| 1115 | 1115 |
| 1116 HostZoomMapImpl* host_zoom_map = static_cast<HostZoomMapImpl*>( | 1116 HostZoomMapImpl* host_zoom_map = |
| 1117 HostZoomMap::GetForBrowserContext(GetProcess()->GetBrowserContext())); | 1117 static_cast<HostZoomMapImpl*>(HostZoomMap::GetForSite(GetSiteInstance())); |
|
awong
2014/08/12 21:07:06
GetForSite() is incorrectly named...This is a Site
wjmaclean
2014/08/13 17:16:03
I'm ok with this, though I suppose it does break t
| |
| 1118 host_zoom_map->SetTemporaryZoomLevel(GetProcess()->GetID(), | 1118 host_zoom_map->SetTemporaryZoomLevel(GetProcess()->GetID(), |
| 1119 GetRoutingID(), | 1119 GetRoutingID(), |
| 1120 host_zoom_map->GetDefaultZoomLevel()); | 1120 host_zoom_map->GetDefaultZoomLevel()); |
| 1121 } | 1121 } |
| 1122 | 1122 |
| 1123 void RenderViewHostImpl::OnToggleFullscreen(bool enter_fullscreen) { | 1123 void RenderViewHostImpl::OnToggleFullscreen(bool enter_fullscreen) { |
| 1124 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1124 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 1125 delegate_->ToggleFullscreenMode(enter_fullscreen); | 1125 delegate_->ToggleFullscreenMode(enter_fullscreen); |
| 1126 // We need to notify the contents that its fullscreen state has changed. This | 1126 // We need to notify the contents that its fullscreen state has changed. This |
| 1127 // is done as part of the resize message. | 1127 // is done as part of the resize message. |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1464 Send(new ViewMsg_PluginActionAt(GetRoutingID(), location, action)); | 1464 Send(new ViewMsg_PluginActionAt(GetRoutingID(), location, action)); |
| 1465 } | 1465 } |
| 1466 | 1466 |
| 1467 void RenderViewHostImpl::NotifyMoveOrResizeStarted() { | 1467 void RenderViewHostImpl::NotifyMoveOrResizeStarted() { |
| 1468 Send(new ViewMsg_MoveOrResizeStarted(GetRoutingID())); | 1468 Send(new ViewMsg_MoveOrResizeStarted(GetRoutingID())); |
| 1469 } | 1469 } |
| 1470 | 1470 |
| 1471 void RenderViewHostImpl::OnDidZoomURL(double zoom_level, | 1471 void RenderViewHostImpl::OnDidZoomURL(double zoom_level, |
| 1472 const GURL& url) { | 1472 const GURL& url) { |
| 1473 HostZoomMapImpl* host_zoom_map = static_cast<HostZoomMapImpl*>( | 1473 HostZoomMapImpl* host_zoom_map = static_cast<HostZoomMapImpl*>( |
| 1474 HostZoomMap::GetForBrowserContext(GetProcess()->GetBrowserContext())); | 1474 HostZoomMap::GetForSite(GetSiteInstance())); |
| 1475 | 1475 |
| 1476 host_zoom_map->SetZoomLevelForView(GetProcess()->GetID(), | 1476 host_zoom_map->SetZoomLevelForView(GetProcess()->GetID(), |
| 1477 GetRoutingID(), | 1477 GetRoutingID(), |
| 1478 zoom_level, | 1478 zoom_level, |
| 1479 net::GetHostOrSpecFromURL(url)); | 1479 net::GetHostOrSpecFromURL(url)); |
| 1480 } | 1480 } |
| 1481 | 1481 |
| 1482 void RenderViewHostImpl::OnRunFileChooser(const FileChooserParams& params) { | 1482 void RenderViewHostImpl::OnRunFileChooser(const FileChooserParams& params) { |
| 1483 delegate_->RunFileChooser(this, params); | 1483 delegate_->RunFileChooser(this, params); |
| 1484 } | 1484 } |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1555 FrameTree* frame_tree = delegate_->GetFrameTree(); | 1555 FrameTree* frame_tree = delegate_->GetFrameTree(); |
| 1556 | 1556 |
| 1557 frame_tree->ResetForMainFrameSwap(); | 1557 frame_tree->ResetForMainFrameSwap(); |
| 1558 } | 1558 } |
| 1559 | 1559 |
| 1560 void RenderViewHostImpl::SelectWordAroundCaret() { | 1560 void RenderViewHostImpl::SelectWordAroundCaret() { |
| 1561 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); | 1561 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); |
| 1562 } | 1562 } |
| 1563 | 1563 |
| 1564 } // namespace content | 1564 } // namespace content |
| OLD | NEW |