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 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1148 Send(new ViewMsg_Move_ACK(GetRoutingID())); | 1148 Send(new ViewMsg_Move_ACK(GetRoutingID())); |
1149 } | 1149 } |
1150 | 1150 |
1151 void RenderViewHostImpl::OnDocumentAvailableInMainFrame( | 1151 void RenderViewHostImpl::OnDocumentAvailableInMainFrame( |
1152 bool uses_temporary_zoom_level) { | 1152 bool uses_temporary_zoom_level) { |
1153 delegate_->DocumentAvailableInMainFrame(this); | 1153 delegate_->DocumentAvailableInMainFrame(this); |
1154 | 1154 |
1155 if (!uses_temporary_zoom_level) | 1155 if (!uses_temporary_zoom_level) |
1156 return; | 1156 return; |
1157 | 1157 |
1158 HostZoomMapImpl* host_zoom_map = static_cast<HostZoomMapImpl*>( | 1158 HostZoomMapImpl* host_zoom_map = |
1159 HostZoomMap::GetForBrowserContext(GetProcess()->GetBrowserContext())); | 1159 static_cast<HostZoomMapImpl*>(HostZoomMap::GetForSite(GetSiteInstance())); |
1160 host_zoom_map->SetTemporaryZoomLevel(GetProcess()->GetID(), | 1160 host_zoom_map->SetTemporaryZoomLevel(GetProcess()->GetID(), |
1161 GetRoutingID(), | 1161 GetRoutingID(), |
1162 host_zoom_map->GetDefaultZoomLevel()); | 1162 host_zoom_map->GetDefaultZoomLevel()); |
1163 } | 1163 } |
1164 | 1164 |
1165 void RenderViewHostImpl::OnToggleFullscreen(bool enter_fullscreen) { | 1165 void RenderViewHostImpl::OnToggleFullscreen(bool enter_fullscreen) { |
1166 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1166 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
1167 delegate_->ToggleFullscreenMode(enter_fullscreen); | 1167 delegate_->ToggleFullscreenMode(enter_fullscreen); |
1168 // We need to notify the contents that its fullscreen state has changed. This | 1168 // We need to notify the contents that its fullscreen state has changed. This |
1169 // is done as part of the resize message. | 1169 // is done as part of the resize message. |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1491 Send(new ViewMsg_PluginActionAt(GetRoutingID(), location, action)); | 1491 Send(new ViewMsg_PluginActionAt(GetRoutingID(), location, action)); |
1492 } | 1492 } |
1493 | 1493 |
1494 void RenderViewHostImpl::NotifyMoveOrResizeStarted() { | 1494 void RenderViewHostImpl::NotifyMoveOrResizeStarted() { |
1495 Send(new ViewMsg_MoveOrResizeStarted(GetRoutingID())); | 1495 Send(new ViewMsg_MoveOrResizeStarted(GetRoutingID())); |
1496 } | 1496 } |
1497 | 1497 |
1498 void RenderViewHostImpl::OnDidZoomURL(double zoom_level, | 1498 void RenderViewHostImpl::OnDidZoomURL(double zoom_level, |
1499 const GURL& url) { | 1499 const GURL& url) { |
1500 HostZoomMapImpl* host_zoom_map = static_cast<HostZoomMapImpl*>( | 1500 HostZoomMapImpl* host_zoom_map = static_cast<HostZoomMapImpl*>( |
1501 HostZoomMap::GetForBrowserContext(GetProcess()->GetBrowserContext())); | 1501 HostZoomMap::GetForSite(GetSiteInstance())); |
1502 | 1502 |
1503 host_zoom_map->SetZoomLevelForView(GetProcess()->GetID(), | 1503 host_zoom_map->SetZoomLevelForView(GetProcess()->GetID(), |
1504 GetRoutingID(), | 1504 GetRoutingID(), |
1505 zoom_level, | 1505 zoom_level, |
1506 net::GetHostOrSpecFromURL(url)); | 1506 net::GetHostOrSpecFromURL(url)); |
1507 } | 1507 } |
1508 | 1508 |
1509 void RenderViewHostImpl::OnRunFileChooser(const FileChooserParams& params) { | 1509 void RenderViewHostImpl::OnRunFileChooser(const FileChooserParams& params) { |
1510 delegate_->RunFileChooser(this, params); | 1510 delegate_->RunFileChooser(this, params); |
1511 } | 1511 } |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1582 FrameTree* frame_tree = delegate_->GetFrameTree(); | 1582 FrameTree* frame_tree = delegate_->GetFrameTree(); |
1583 | 1583 |
1584 frame_tree->ResetForMainFrameSwap(); | 1584 frame_tree->ResetForMainFrameSwap(); |
1585 } | 1585 } |
1586 | 1586 |
1587 void RenderViewHostImpl::SelectWordAroundCaret() { | 1587 void RenderViewHostImpl::SelectWordAroundCaret() { |
1588 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); | 1588 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); |
1589 } | 1589 } |
1590 | 1590 |
1591 } // namespace content | 1591 } // namespace content |
OLD | NEW |