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 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
977 OnShowFullscreenWidget) | 977 OnShowFullscreenWidget) |
978 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunModal, OnRunModal) | 978 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunModal, OnRunModal) |
979 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewReady, OnRenderViewReady) | 979 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewReady, OnRenderViewReady) |
980 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderProcessGone, OnRenderProcessGone) | 980 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderProcessGone, OnRenderProcessGone) |
981 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateState, OnUpdateState) | 981 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateState, OnUpdateState) |
982 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateTargetURL, OnUpdateTargetURL) | 982 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateTargetURL, OnUpdateTargetURL) |
983 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateInspectorSetting, | 983 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateInspectorSetting, |
984 OnUpdateInspectorSetting) | 984 OnUpdateInspectorSetting) |
985 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose) | 985 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose) |
986 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnRequestMove) | 986 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnRequestMove) |
987 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeLoadProgress, | |
988 OnDidChangeLoadProgress) | |
989 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentAvailableInMainFrame, | 987 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentAvailableInMainFrame, |
990 OnDocumentAvailableInMainFrame) | 988 OnDocumentAvailableInMainFrame) |
991 IPC_MESSAGE_HANDLER(ViewHostMsg_ToggleFullscreen, OnToggleFullscreen) | 989 IPC_MESSAGE_HANDLER(ViewHostMsg_ToggleFullscreen, OnToggleFullscreen) |
992 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange, | 990 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange, |
993 OnDidContentsPreferredSizeChange) | 991 OnDidContentsPreferredSizeChange) |
994 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeScrollOffset, | 992 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeScrollOffset, |
995 OnDidChangeScrollOffset) | 993 OnDidChangeScrollOffset) |
996 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame, | 994 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame, |
997 OnDidChangeScrollOffsetPinningForMainFrame) | 995 OnDidChangeScrollOffsetPinningForMainFrame) |
998 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeNumWheelEvents, | 996 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeNumWheelEvents, |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1187 // events, and we can take the fast path. | 1185 // events, and we can take the fast path. |
1188 ClosePageIgnoringUnloadEvents(); | 1186 ClosePageIgnoringUnloadEvents(); |
1189 } | 1187 } |
1190 | 1188 |
1191 void RenderViewHostImpl::OnRequestMove(const gfx::Rect& pos) { | 1189 void RenderViewHostImpl::OnRequestMove(const gfx::Rect& pos) { |
1192 if (IsRVHStateActive(rvh_state_)) | 1190 if (IsRVHStateActive(rvh_state_)) |
1193 delegate_->RequestMove(pos); | 1191 delegate_->RequestMove(pos); |
1194 Send(new ViewMsg_Move_ACK(GetRoutingID())); | 1192 Send(new ViewMsg_Move_ACK(GetRoutingID())); |
1195 } | 1193 } |
1196 | 1194 |
1197 void RenderViewHostImpl::OnDidChangeLoadProgress(double load_progress) { | |
1198 delegate_->DidChangeLoadProgress(load_progress); | |
1199 } | |
1200 | |
1201 void RenderViewHostImpl::OnDocumentAvailableInMainFrame() { | 1195 void RenderViewHostImpl::OnDocumentAvailableInMainFrame() { |
1202 delegate_->DocumentAvailableInMainFrame(this); | 1196 delegate_->DocumentAvailableInMainFrame(this); |
1203 } | 1197 } |
1204 | 1198 |
1205 void RenderViewHostImpl::OnToggleFullscreen(bool enter_fullscreen) { | 1199 void RenderViewHostImpl::OnToggleFullscreen(bool enter_fullscreen) { |
1206 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1200 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
1207 delegate_->ToggleFullscreenMode(enter_fullscreen); | 1201 delegate_->ToggleFullscreenMode(enter_fullscreen); |
1208 // We need to notify the contents that its fullscreen state has changed. This | 1202 // We need to notify the contents that its fullscreen state has changed. This |
1209 // is done as part of the resize message. | 1203 // is done as part of the resize message. |
1210 WasResized(); | 1204 WasResized(); |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1693 return true; | 1687 return true; |
1694 } | 1688 } |
1695 | 1689 |
1696 void RenderViewHostImpl::AttachToFrameTree() { | 1690 void RenderViewHostImpl::AttachToFrameTree() { |
1697 FrameTree* frame_tree = delegate_->GetFrameTree(); | 1691 FrameTree* frame_tree = delegate_->GetFrameTree(); |
1698 | 1692 |
1699 frame_tree->ResetForMainFrameSwap(); | 1693 frame_tree->ResetForMainFrameSwap(); |
1700 } | 1694 } |
1701 | 1695 |
1702 } // namespace content | 1696 } // namespace content |
OLD | NEW |