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