| 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 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1080 Send(new ViewMsg_Move_ACK(GetRoutingID())); | 1080 Send(new ViewMsg_Move_ACK(GetRoutingID())); |
| 1081 } | 1081 } |
| 1082 | 1082 |
| 1083 void RenderViewHostImpl::OnDocumentAvailableInMainFrame( | 1083 void RenderViewHostImpl::OnDocumentAvailableInMainFrame( |
| 1084 bool uses_temporary_zoom_level) { | 1084 bool uses_temporary_zoom_level) { |
| 1085 delegate_->DocumentAvailableInMainFrame(this); | 1085 delegate_->DocumentAvailableInMainFrame(this); |
| 1086 | 1086 |
| 1087 if (!uses_temporary_zoom_level) | 1087 if (!uses_temporary_zoom_level) |
| 1088 return; | 1088 return; |
| 1089 | 1089 |
| 1090 HostZoomMapImpl* host_zoom_map = static_cast<HostZoomMapImpl*>( | 1090 HostZoomMapImpl* host_zoom_map = |
| 1091 HostZoomMap::GetForBrowserContext(GetProcess()->GetBrowserContext())); | 1091 static_cast<HostZoomMapImpl*>(HostZoomMap::Get(GetSiteInstance())); |
| 1092 host_zoom_map->SetTemporaryZoomLevel(GetProcess()->GetID(), | 1092 host_zoom_map->SetTemporaryZoomLevel(GetProcess()->GetID(), |
| 1093 GetRoutingID(), | 1093 GetRoutingID(), |
| 1094 host_zoom_map->GetDefaultZoomLevel()); | 1094 host_zoom_map->GetDefaultZoomLevel()); |
| 1095 } | 1095 } |
| 1096 | 1096 |
| 1097 void RenderViewHostImpl::OnToggleFullscreen(bool enter_fullscreen) { | 1097 void RenderViewHostImpl::OnToggleFullscreen(bool enter_fullscreen) { |
| 1098 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1098 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 1099 delegate_->ToggleFullscreenMode(enter_fullscreen); | 1099 delegate_->ToggleFullscreenMode(enter_fullscreen); |
| 1100 // We need to notify the contents that its fullscreen state has changed. This | 1100 // We need to notify the contents that its fullscreen state has changed. This |
| 1101 // is done as part of the resize message. | 1101 // is done as part of the resize message. |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1429 Send(new ViewMsg_PluginActionAt(GetRoutingID(), location, action)); | 1429 Send(new ViewMsg_PluginActionAt(GetRoutingID(), location, action)); |
| 1430 } | 1430 } |
| 1431 | 1431 |
| 1432 void RenderViewHostImpl::NotifyMoveOrResizeStarted() { | 1432 void RenderViewHostImpl::NotifyMoveOrResizeStarted() { |
| 1433 Send(new ViewMsg_MoveOrResizeStarted(GetRoutingID())); | 1433 Send(new ViewMsg_MoveOrResizeStarted(GetRoutingID())); |
| 1434 } | 1434 } |
| 1435 | 1435 |
| 1436 void RenderViewHostImpl::OnDidZoomURL(double zoom_level, | 1436 void RenderViewHostImpl::OnDidZoomURL(double zoom_level, |
| 1437 const GURL& url) { | 1437 const GURL& url) { |
| 1438 HostZoomMapImpl* host_zoom_map = static_cast<HostZoomMapImpl*>( | 1438 HostZoomMapImpl* host_zoom_map = static_cast<HostZoomMapImpl*>( |
| 1439 HostZoomMap::GetForBrowserContext(GetProcess()->GetBrowserContext())); | 1439 HostZoomMap::Get(GetSiteInstance())); |
| 1440 | 1440 |
| 1441 host_zoom_map->SetZoomLevelForView(GetProcess()->GetID(), | 1441 host_zoom_map->SetZoomLevelForView(GetProcess()->GetID(), |
| 1442 GetRoutingID(), | 1442 GetRoutingID(), |
| 1443 zoom_level, | 1443 zoom_level, |
| 1444 net::GetHostOrSpecFromURL(url)); | 1444 net::GetHostOrSpecFromURL(url)); |
| 1445 } | 1445 } |
| 1446 | 1446 |
| 1447 void RenderViewHostImpl::OnRunFileChooser(const FileChooserParams& params) { | 1447 void RenderViewHostImpl::OnRunFileChooser(const FileChooserParams& params) { |
| 1448 delegate_->RunFileChooser(this, params); | 1448 delegate_->RunFileChooser(this, params); |
| 1449 } | 1449 } |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1520 FrameTree* frame_tree = delegate_->GetFrameTree(); | 1520 FrameTree* frame_tree = delegate_->GetFrameTree(); |
| 1521 | 1521 |
| 1522 frame_tree->ResetForMainFrameSwap(); | 1522 frame_tree->ResetForMainFrameSwap(); |
| 1523 } | 1523 } |
| 1524 | 1524 |
| 1525 void RenderViewHostImpl::SelectWordAroundCaret() { | 1525 void RenderViewHostImpl::SelectWordAroundCaret() { |
| 1526 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); | 1526 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); |
| 1527 } | 1527 } |
| 1528 | 1528 |
| 1529 } // namespace content | 1529 } // namespace content |
| OLD | NEW |