| 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 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 993 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewReady, OnRenderViewReady) | 993 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewReady, OnRenderViewReady) |
| 994 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderProcessGone, OnRenderProcessGone) | 994 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderProcessGone, OnRenderProcessGone) |
| 995 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateState, OnUpdateState) | 995 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateState, OnUpdateState) |
| 996 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateTitle, OnUpdateTitle) | 996 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateTitle, OnUpdateTitle) |
| 997 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateEncoding, OnUpdateEncoding) | 997 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateEncoding, OnUpdateEncoding) |
| 998 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateTargetURL, OnUpdateTargetURL) | 998 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateTargetURL, OnUpdateTargetURL) |
| 999 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateInspectorSetting, | 999 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateInspectorSetting, |
| 1000 OnUpdateInspectorSetting) | 1000 OnUpdateInspectorSetting) |
| 1001 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose) | 1001 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose) |
| 1002 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnRequestMove) | 1002 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnRequestMove) |
| 1003 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeLoadProgress, | |
| 1004 OnDidChangeLoadProgress) | |
| 1005 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentAvailableInMainFrame, | 1003 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentAvailableInMainFrame, |
| 1006 OnDocumentAvailableInMainFrame) | 1004 OnDocumentAvailableInMainFrame) |
| 1007 IPC_MESSAGE_HANDLER(ViewHostMsg_ToggleFullscreen, OnToggleFullscreen) | 1005 IPC_MESSAGE_HANDLER(ViewHostMsg_ToggleFullscreen, OnToggleFullscreen) |
| 1008 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange, | 1006 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange, |
| 1009 OnDidContentsPreferredSizeChange) | 1007 OnDidContentsPreferredSizeChange) |
| 1010 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeScrollOffset, | 1008 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeScrollOffset, |
| 1011 OnDidChangeScrollOffset) | 1009 OnDidChangeScrollOffset) |
| 1012 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame, | 1010 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame, |
| 1013 OnDidChangeScrollOffsetPinningForMainFrame) | 1011 OnDidChangeScrollOffsetPinningForMainFrame) |
| 1014 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeNumWheelEvents, | 1012 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeNumWheelEvents, |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1221 // events, and we can take the fast path. | 1219 // events, and we can take the fast path. |
| 1222 ClosePageIgnoringUnloadEvents(); | 1220 ClosePageIgnoringUnloadEvents(); |
| 1223 } | 1221 } |
| 1224 | 1222 |
| 1225 void RenderViewHostImpl::OnRequestMove(const gfx::Rect& pos) { | 1223 void RenderViewHostImpl::OnRequestMove(const gfx::Rect& pos) { |
| 1226 if (IsRVHStateActive(rvh_state_)) | 1224 if (IsRVHStateActive(rvh_state_)) |
| 1227 delegate_->RequestMove(pos); | 1225 delegate_->RequestMove(pos); |
| 1228 Send(new ViewMsg_Move_ACK(GetRoutingID())); | 1226 Send(new ViewMsg_Move_ACK(GetRoutingID())); |
| 1229 } | 1227 } |
| 1230 | 1228 |
| 1231 void RenderViewHostImpl::OnDidChangeLoadProgress(double load_progress) { | |
| 1232 delegate_->DidChangeLoadProgress(load_progress); | |
| 1233 } | |
| 1234 | |
| 1235 void RenderViewHostImpl::OnDocumentAvailableInMainFrame() { | 1229 void RenderViewHostImpl::OnDocumentAvailableInMainFrame() { |
| 1236 delegate_->DocumentAvailableInMainFrame(this); | 1230 delegate_->DocumentAvailableInMainFrame(this); |
| 1237 } | 1231 } |
| 1238 | 1232 |
| 1239 void RenderViewHostImpl::OnToggleFullscreen(bool enter_fullscreen) { | 1233 void RenderViewHostImpl::OnToggleFullscreen(bool enter_fullscreen) { |
| 1240 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1234 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 1241 delegate_->ToggleFullscreenMode(enter_fullscreen); | 1235 delegate_->ToggleFullscreenMode(enter_fullscreen); |
| 1242 // We need to notify the contents that its fullscreen state has changed. This | 1236 // We need to notify the contents that its fullscreen state has changed. This |
| 1243 // is done as part of the resize message. | 1237 // is done as part of the resize message. |
| 1244 WasResized(); | 1238 WasResized(); |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1721 return true; | 1715 return true; |
| 1722 } | 1716 } |
| 1723 | 1717 |
| 1724 void RenderViewHostImpl::AttachToFrameTree() { | 1718 void RenderViewHostImpl::AttachToFrameTree() { |
| 1725 FrameTree* frame_tree = delegate_->GetFrameTree(); | 1719 FrameTree* frame_tree = delegate_->GetFrameTree(); |
| 1726 | 1720 |
| 1727 frame_tree->ResetForMainFrameSwap(); | 1721 frame_tree->ResetForMainFrameSwap(); |
| 1728 } | 1722 } |
| 1729 | 1723 |
| 1730 } // namespace content | 1724 } // namespace content |
| OLD | NEW |