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

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: add test Created 9 years, 3 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
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 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnMsgRequestMove) 682 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnMsgRequestMove)
683 IPC_MESSAGE_HANDLER(ViewHostMsg_DidStartLoading, OnMsgDidStartLoading) 683 IPC_MESSAGE_HANDLER(ViewHostMsg_DidStartLoading, OnMsgDidStartLoading)
684 IPC_MESSAGE_HANDLER(ViewHostMsg_DidStopLoading, OnMsgDidStopLoading) 684 IPC_MESSAGE_HANDLER(ViewHostMsg_DidStopLoading, OnMsgDidStopLoading)
685 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeLoadProgress, 685 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeLoadProgress,
686 OnMsgDidChangeLoadProgress) 686 OnMsgDidChangeLoadProgress)
687 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentAvailableInMainFrame, 687 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentAvailableInMainFrame,
688 OnMsgDocumentAvailableInMainFrame) 688 OnMsgDocumentAvailableInMainFrame)
689 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentOnLoadCompletedInMainFrame, 689 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentOnLoadCompletedInMainFrame,
690 OnMsgDocumentOnLoadCompletedInMainFrame) 690 OnMsgDocumentOnLoadCompletedInMainFrame)
691 IPC_MESSAGE_HANDLER(ViewHostMsg_ContextMenu, OnMsgContextMenu) 691 IPC_MESSAGE_HANDLER(ViewHostMsg_ContextMenu, OnMsgContextMenu)
692 IPC_MESSAGE_HANDLER(ViewHostMsg_ToggleFullscreen,
693 OnMsgToggleFullscreen)
692 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenURL, OnMsgOpenURL) 694 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenURL, OnMsgOpenURL)
693 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange, 695 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange,
694 OnMsgDidContentsPreferredSizeChange) 696 OnMsgDidContentsPreferredSizeChange)
695 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeScrollbarsForMainFrame, 697 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeScrollbarsForMainFrame,
696 OnMsgDidChangeScrollbarsForMainFrame) 698 OnMsgDidChangeScrollbarsForMainFrame)
697 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame, 699 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame,
698 OnMsgDidChangeScrollOffsetPinningForMainFrame) 700 OnMsgDidChangeScrollOffsetPinningForMainFrame)
699 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeNumWheelEvents, 701 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeNumWheelEvents,
700 OnMsgDidChangeNumWheelEvents) 702 OnMsgDidChangeNumWheelEvents)
701 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunJavaScriptMessage, 703 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunJavaScriptMessage,
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 // We don't validate |unfiltered_link_url| so that this field can be used 984 // We don't validate |unfiltered_link_url| so that this field can be used
983 // when users want to copy the original link URL. 985 // when users want to copy the original link URL.
984 FilterURL(policy, renderer_id, &validated_params.link_url); 986 FilterURL(policy, renderer_id, &validated_params.link_url);
985 FilterURL(policy, renderer_id, &validated_params.src_url); 987 FilterURL(policy, renderer_id, &validated_params.src_url);
986 FilterURL(policy, renderer_id, &validated_params.page_url); 988 FilterURL(policy, renderer_id, &validated_params.page_url);
987 FilterURL(policy, renderer_id, &validated_params.frame_url); 989 FilterURL(policy, renderer_id, &validated_params.frame_url);
988 990
989 view->ShowContextMenu(validated_params); 991 view->ShowContextMenu(validated_params);
990 } 992 }
991 993
994 void RenderViewHost::OnMsgToggleFullscreen(bool enter_fullscreen) {
995 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
996 delegate_->ToggleFullscreenMode(enter_fullscreen);
997 }
998
992 void RenderViewHost::OnMsgOpenURL(const GURL& url, 999 void RenderViewHost::OnMsgOpenURL(const GURL& url,
993 const GURL& referrer, 1000 const GURL& referrer,
994 WindowOpenDisposition disposition) { 1001 WindowOpenDisposition disposition) {
995 GURL validated_url(url); 1002 GURL validated_url(url);
996 FilterURL(ChildProcessSecurityPolicy::GetInstance(), 1003 FilterURL(ChildProcessSecurityPolicy::GetInstance(),
997 process()->id(), &validated_url); 1004 process()->id(), &validated_url);
998 1005
999 delegate_->RequestOpenURL(validated_url, referrer, disposition); 1006 delegate_->RequestOpenURL(validated_url, referrer, disposition);
1000 } 1007 }
1001 1008
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
1355 if (view) { 1362 if (view) {
1356 view->ShowPopupMenu(params.bounds, 1363 view->ShowPopupMenu(params.bounds,
1357 params.item_height, 1364 params.item_height,
1358 params.item_font_size, 1365 params.item_font_size,
1359 params.selected_item, 1366 params.selected_item,
1360 params.popup_items, 1367 params.popup_items,
1361 params.right_aligned); 1368 params.right_aligned);
1362 } 1369 }
1363 } 1370 }
1364 #endif 1371 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698