OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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.h" | 5 #include "content/browser/renderer_host/render_view_host.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnMsgRequestMove) | 665 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnMsgRequestMove) |
666 IPC_MESSAGE_HANDLER(ViewHostMsg_DidStartLoading, OnMsgDidStartLoading) | 666 IPC_MESSAGE_HANDLER(ViewHostMsg_DidStartLoading, OnMsgDidStartLoading) |
667 IPC_MESSAGE_HANDLER(ViewHostMsg_DidStopLoading, OnMsgDidStopLoading) | 667 IPC_MESSAGE_HANDLER(ViewHostMsg_DidStopLoading, OnMsgDidStopLoading) |
668 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeLoadProgress, | 668 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeLoadProgress, |
669 OnMsgDidChangeLoadProgress) | 669 OnMsgDidChangeLoadProgress) |
670 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentAvailableInMainFrame, | 670 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentAvailableInMainFrame, |
671 OnMsgDocumentAvailableInMainFrame) | 671 OnMsgDocumentAvailableInMainFrame) |
672 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentOnLoadCompletedInMainFrame, | 672 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentOnLoadCompletedInMainFrame, |
673 OnMsgDocumentOnLoadCompletedInMainFrame) | 673 OnMsgDocumentOnLoadCompletedInMainFrame) |
674 IPC_MESSAGE_HANDLER(ViewHostMsg_ContextMenu, OnMsgContextMenu) | 674 IPC_MESSAGE_HANDLER(ViewHostMsg_ContextMenu, OnMsgContextMenu) |
| 675 IPC_MESSAGE_HANDLER(ViewHostMsg_EnterFullscreenForElement, |
| 676 OnMsgEnterFullscreenForElement) |
| 677 IPC_MESSAGE_HANDLER(ViewHostMsg_ExitFullscreenForElement, |
| 678 OnMsgExitFullscreenForElement) |
675 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenURL, OnMsgOpenURL) | 679 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenURL, OnMsgOpenURL) |
676 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange, | 680 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange, |
677 OnMsgDidContentsPreferredSizeChange) | 681 OnMsgDidContentsPreferredSizeChange) |
678 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunJavaScriptMessage, | 682 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunJavaScriptMessage, |
679 OnMsgRunJavaScriptMessage) | 683 OnMsgRunJavaScriptMessage) |
680 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunBeforeUnloadConfirm, | 684 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunBeforeUnloadConfirm, |
681 OnMsgRunBeforeUnloadConfirm) | 685 OnMsgRunBeforeUnloadConfirm) |
682 IPC_MESSAGE_HANDLER(DragHostMsg_StartDragging, OnMsgStartDragging) | 686 IPC_MESSAGE_HANDLER(DragHostMsg_StartDragging, OnMsgStartDragging) |
683 IPC_MESSAGE_HANDLER(DragHostMsg_UpdateDragCursor, OnUpdateDragCursor) | 687 IPC_MESSAGE_HANDLER(DragHostMsg_UpdateDragCursor, OnUpdateDragCursor) |
684 IPC_MESSAGE_HANDLER(DragHostMsg_TargetDrop_ACK, OnTargetDropACK) | 688 IPC_MESSAGE_HANDLER(DragHostMsg_TargetDrop_ACK, OnTargetDropACK) |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
954 // We don't validate |unfiltered_link_url| so that this field can be used | 958 // We don't validate |unfiltered_link_url| so that this field can be used |
955 // when users want to copy the original link URL. | 959 // when users want to copy the original link URL. |
956 FilterURL(policy, renderer_id, &validated_params.link_url); | 960 FilterURL(policy, renderer_id, &validated_params.link_url); |
957 FilterURL(policy, renderer_id, &validated_params.src_url); | 961 FilterURL(policy, renderer_id, &validated_params.src_url); |
958 FilterURL(policy, renderer_id, &validated_params.page_url); | 962 FilterURL(policy, renderer_id, &validated_params.page_url); |
959 FilterURL(policy, renderer_id, &validated_params.frame_url); | 963 FilterURL(policy, renderer_id, &validated_params.frame_url); |
960 | 964 |
961 view->ShowContextMenu(validated_params); | 965 view->ShowContextMenu(validated_params); |
962 } | 966 } |
963 | 967 |
| 968 void RenderViewHost::OnMsgEnterFullscreenForElement() { |
| 969 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 970 delegate_->EnterFullscreenMode(); |
| 971 } |
| 972 |
| 973 void RenderViewHost::OnMsgExitFullscreenForElement() { |
| 974 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 975 delegate_->ExitFullscreenMode(); |
| 976 } |
| 977 |
964 void RenderViewHost::OnMsgOpenURL(const GURL& url, | 978 void RenderViewHost::OnMsgOpenURL(const GURL& url, |
965 const GURL& referrer, | 979 const GURL& referrer, |
966 WindowOpenDisposition disposition) { | 980 WindowOpenDisposition disposition) { |
967 GURL validated_url(url); | 981 GURL validated_url(url); |
968 FilterURL(ChildProcessSecurityPolicy::GetInstance(), | 982 FilterURL(ChildProcessSecurityPolicy::GetInstance(), |
969 process()->id(), &validated_url); | 983 process()->id(), &validated_url); |
970 | 984 |
971 delegate_->RequestOpenURL(validated_url, referrer, disposition); | 985 delegate_->RequestOpenURL(validated_url, referrer, disposition); |
972 } | 986 } |
973 | 987 |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1313 if (view) { | 1327 if (view) { |
1314 view->ShowPopupMenu(params.bounds, | 1328 view->ShowPopupMenu(params.bounds, |
1315 params.item_height, | 1329 params.item_height, |
1316 params.item_font_size, | 1330 params.item_font_size, |
1317 params.selected_item, | 1331 params.selected_item, |
1318 params.popup_items, | 1332 params.popup_items, |
1319 params.right_aligned); | 1333 params.right_aligned); |
1320 } | 1334 } |
1321 } | 1335 } |
1322 #endif | 1336 #endif |
OLD | NEW |