Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: content/browser/renderer_host/render_view_host.cc

Issue 7461059: Fullscreen JS API implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tweaks Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/browser/renderer_host/render_view_host.h ('k') | content/common/view_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 content::GetContentClient()->browser()->EnterFullscreenMode();
sky 2011/07/28 00:45:54 ContentClient isn't intended for this sort of call
koz (OOO until 15th September) 2011/07/28 03:20:46 Done.
971 }
972
973 void RenderViewHost::OnMsgExitFullscreenForElement() {
974 content::GetContentClient()->browser()->ExitFullscreenMode();
975 }
976
964 void RenderViewHost::OnMsgOpenURL(const GURL& url, 977 void RenderViewHost::OnMsgOpenURL(const GURL& url,
965 const GURL& referrer, 978 const GURL& referrer,
966 WindowOpenDisposition disposition) { 979 WindowOpenDisposition disposition) {
967 GURL validated_url(url); 980 GURL validated_url(url);
968 FilterURL(ChildProcessSecurityPolicy::GetInstance(), 981 FilterURL(ChildProcessSecurityPolicy::GetInstance(),
969 process()->id(), &validated_url); 982 process()->id(), &validated_url);
970 983
971 delegate_->RequestOpenURL(validated_url, referrer, disposition); 984 delegate_->RequestOpenURL(validated_url, referrer, disposition);
972 } 985 }
973 986
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 if (view) { 1326 if (view) {
1314 view->ShowPopupMenu(params.bounds, 1327 view->ShowPopupMenu(params.bounds,
1315 params.item_height, 1328 params.item_height,
1316 params.item_font_size, 1329 params.item_font_size,
1317 params.selected_item, 1330 params.selected_item,
1318 params.popup_items, 1331 params.popup_items,
1319 params.right_aligned); 1332 params.right_aligned);
1320 } 1333 }
1321 } 1334 }
1322 #endif 1335 #endif
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host.h ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698