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 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1118 Send(new ViewMsg_Move_ACK(GetRoutingID())); | 1118 Send(new ViewMsg_Move_ACK(GetRoutingID())); |
1119 } | 1119 } |
1120 | 1120 |
1121 void RenderViewHostImpl::OnDocumentAvailableInMainFrame( | 1121 void RenderViewHostImpl::OnDocumentAvailableInMainFrame( |
1122 bool uses_temporary_zoom_level) { | 1122 bool uses_temporary_zoom_level) { |
1123 delegate_->DocumentAvailableInMainFrame(this); | 1123 delegate_->DocumentAvailableInMainFrame(this); |
1124 | 1124 |
1125 if (!uses_temporary_zoom_level) | 1125 if (!uses_temporary_zoom_level) |
1126 return; | 1126 return; |
1127 | 1127 |
1128 HostZoomMapImpl* host_zoom_map = static_cast<HostZoomMapImpl*>( | 1128 HostZoomMapImpl* host_zoom_map = |
1129 HostZoomMap::GetForBrowserContext(GetProcess()->GetBrowserContext())); | 1129 static_cast<HostZoomMapImpl*>(HostZoomMap::Get(GetSiteInstance())); |
1130 host_zoom_map->SetTemporaryZoomLevel(GetProcess()->GetID(), | 1130 host_zoom_map->SetTemporaryZoomLevel(GetProcess()->GetID(), |
1131 GetRoutingID(), | 1131 GetRoutingID(), |
1132 host_zoom_map->GetDefaultZoomLevel()); | 1132 host_zoom_map->GetDefaultZoomLevel()); |
1133 } | 1133 } |
1134 | 1134 |
1135 void RenderViewHostImpl::OnToggleFullscreen(bool enter_fullscreen) { | 1135 void RenderViewHostImpl::OnToggleFullscreen(bool enter_fullscreen) { |
1136 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1136 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
1137 delegate_->ToggleFullscreenMode(enter_fullscreen); | 1137 delegate_->ToggleFullscreenMode(enter_fullscreen); |
1138 // We need to notify the contents that its fullscreen state has changed. This | 1138 // We need to notify the contents that its fullscreen state has changed. This |
1139 // is done as part of the resize message. | 1139 // is done as part of the resize message. |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1476 Send(new ViewMsg_PluginActionAt(GetRoutingID(), location, action)); | 1476 Send(new ViewMsg_PluginActionAt(GetRoutingID(), location, action)); |
1477 } | 1477 } |
1478 | 1478 |
1479 void RenderViewHostImpl::NotifyMoveOrResizeStarted() { | 1479 void RenderViewHostImpl::NotifyMoveOrResizeStarted() { |
1480 Send(new ViewMsg_MoveOrResizeStarted(GetRoutingID())); | 1480 Send(new ViewMsg_MoveOrResizeStarted(GetRoutingID())); |
1481 } | 1481 } |
1482 | 1482 |
1483 void RenderViewHostImpl::OnDidZoomURL(double zoom_level, | 1483 void RenderViewHostImpl::OnDidZoomURL(double zoom_level, |
1484 const GURL& url) { | 1484 const GURL& url) { |
1485 HostZoomMapImpl* host_zoom_map = static_cast<HostZoomMapImpl*>( | 1485 HostZoomMapImpl* host_zoom_map = static_cast<HostZoomMapImpl*>( |
1486 HostZoomMap::GetForBrowserContext(GetProcess()->GetBrowserContext())); | 1486 HostZoomMap::Get(GetSiteInstance())); |
1487 | 1487 |
1488 host_zoom_map->SetZoomLevelForView(GetProcess()->GetID(), | 1488 host_zoom_map->SetZoomLevelForView(GetProcess()->GetID(), |
1489 GetRoutingID(), | 1489 GetRoutingID(), |
1490 zoom_level, | 1490 zoom_level, |
1491 net::GetHostOrSpecFromURL(url)); | 1491 net::GetHostOrSpecFromURL(url)); |
1492 } | 1492 } |
1493 | 1493 |
1494 void RenderViewHostImpl::OnRunFileChooser(const FileChooserParams& params) { | 1494 void RenderViewHostImpl::OnRunFileChooser(const FileChooserParams& params) { |
1495 delegate_->RunFileChooser(this, params); | 1495 delegate_->RunFileChooser(this, params); |
1496 } | 1496 } |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1567 FrameTree* frame_tree = delegate_->GetFrameTree(); | 1567 FrameTree* frame_tree = delegate_->GetFrameTree(); |
1568 | 1568 |
1569 frame_tree->ResetForMainFrameSwap(); | 1569 frame_tree->ResetForMainFrameSwap(); |
1570 } | 1570 } |
1571 | 1571 |
1572 void RenderViewHostImpl::SelectWordAroundCaret() { | 1572 void RenderViewHostImpl::SelectWordAroundCaret() { |
1573 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); | 1573 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); |
1574 } | 1574 } |
1575 | 1575 |
1576 } // namespace content | 1576 } // namespace content |
OLD | NEW |