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