| 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 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1181 void RenderViewHostImpl::OnRequestMove(const gfx::Rect& pos) { | 1181 void RenderViewHostImpl::OnRequestMove(const gfx::Rect& pos) { |
| 1182 if (IsRVHStateActive(rvh_state_)) | 1182 if (IsRVHStateActive(rvh_state_)) |
| 1183 delegate_->RequestMove(pos); | 1183 delegate_->RequestMove(pos); |
| 1184 Send(new ViewMsg_Move_ACK(GetRoutingID())); | 1184 Send(new ViewMsg_Move_ACK(GetRoutingID())); |
| 1185 } | 1185 } |
| 1186 | 1186 |
| 1187 void RenderViewHostImpl::OnDocumentAvailableInMainFrame( | 1187 void RenderViewHostImpl::OnDocumentAvailableInMainFrame( |
| 1188 bool uses_temporary_zoom_level) { | 1188 bool uses_temporary_zoom_level) { |
| 1189 delegate_->DocumentAvailableInMainFrame(this); | 1189 delegate_->DocumentAvailableInMainFrame(this); |
| 1190 | 1190 |
| 1191 if (!uses_temporary_zoom_level) |
| 1192 return; |
| 1193 |
| 1191 HostZoomMapImpl* host_zoom_map = static_cast<HostZoomMapImpl*>( | 1194 HostZoomMapImpl* host_zoom_map = static_cast<HostZoomMapImpl*>( |
| 1192 HostZoomMap::GetForBrowserContext(GetProcess()->GetBrowserContext())); | 1195 HostZoomMap::GetForBrowserContext(GetProcess()->GetBrowserContext())); |
| 1193 host_zoom_map->SetUsesTemporaryZoomLevel( | 1196 host_zoom_map->SetTemporaryZoomLevel(GetProcess()->GetID(), |
| 1194 GetProcess()->GetID(), GetRoutingID(), uses_temporary_zoom_level); | 1197 GetRoutingID(), |
| 1198 host_zoom_map->GetDefaultZoomLevel()); |
| 1195 } | 1199 } |
| 1196 | 1200 |
| 1197 void RenderViewHostImpl::OnToggleFullscreen(bool enter_fullscreen) { | 1201 void RenderViewHostImpl::OnToggleFullscreen(bool enter_fullscreen) { |
| 1198 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1202 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 1199 delegate_->ToggleFullscreenMode(enter_fullscreen); | 1203 delegate_->ToggleFullscreenMode(enter_fullscreen); |
| 1200 // We need to notify the contents that its fullscreen state has changed. This | 1204 // We need to notify the contents that its fullscreen state has changed. This |
| 1201 // is done as part of the resize message. | 1205 // is done as part of the resize message. |
| 1202 WasResized(); | 1206 WasResized(); |
| 1203 } | 1207 } |
| 1204 | 1208 |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1668 FrameTree* frame_tree = delegate_->GetFrameTree(); | 1672 FrameTree* frame_tree = delegate_->GetFrameTree(); |
| 1669 | 1673 |
| 1670 frame_tree->ResetForMainFrameSwap(); | 1674 frame_tree->ResetForMainFrameSwap(); |
| 1671 } | 1675 } |
| 1672 | 1676 |
| 1673 void RenderViewHostImpl::SelectWordAroundCaret() { | 1677 void RenderViewHostImpl::SelectWordAroundCaret() { |
| 1674 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); | 1678 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); |
| 1675 } | 1679 } |
| 1676 | 1680 |
| 1677 } // namespace content | 1681 } // namespace content |
| OLD | NEW |