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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 789533002: Fullscreen: make fullscreen requests come from RenderFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make try happy Created 5 years, 11 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/frame_host/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/containers/hash_tables.h" 9 #include "base/containers/hash_tables.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateEncoding, OnUpdateEncoding) 328 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateEncoding, OnUpdateEncoding)
329 IPC_MESSAGE_HANDLER(FrameHostMsg_BeginNavigation, 329 IPC_MESSAGE_HANDLER(FrameHostMsg_BeginNavigation,
330 OnBeginNavigation) 330 OnBeginNavigation)
331 IPC_MESSAGE_HANDLER(FrameHostMsg_TextSurroundingSelectionResponse, 331 IPC_MESSAGE_HANDLER(FrameHostMsg_TextSurroundingSelectionResponse,
332 OnTextSurroundingSelectionResponse) 332 OnTextSurroundingSelectionResponse)
333 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Events, OnAccessibilityEvents) 333 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Events, OnAccessibilityEvents)
334 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_LocationChanges, 334 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_LocationChanges,
335 OnAccessibilityLocationChanges) 335 OnAccessibilityLocationChanges)
336 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_FindInPageResult, 336 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_FindInPageResult,
337 OnAccessibilityFindInPageResult) 337 OnAccessibilityFindInPageResult)
338 IPC_MESSAGE_HANDLER(FrameHostMsg_ToggleFullscreen, OnToggleFullscreen)
338 #if defined(OS_MACOSX) || defined(OS_ANDROID) 339 #if defined(OS_MACOSX) || defined(OS_ANDROID)
339 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowPopup, OnShowPopup) 340 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowPopup, OnShowPopup)
340 IPC_MESSAGE_HANDLER(FrameHostMsg_HidePopup, OnHidePopup) 341 IPC_MESSAGE_HANDLER(FrameHostMsg_HidePopup, OnHidePopup)
341 #endif 342 #endif
342 IPC_END_MESSAGE_MAP() 343 IPC_END_MESSAGE_MAP()
343 344
344 // No further actions here, since we may have been deleted. 345 // No further actions here, since we may have been deleted.
345 return handled; 346 return handled;
346 } 347 }
347 348
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
1129 BrowserAccessibilityManager* manager = 1130 BrowserAccessibilityManager* manager =
1130 GetOrCreateBrowserAccessibilityManager(); 1131 GetOrCreateBrowserAccessibilityManager();
1131 if (manager) { 1132 if (manager) {
1132 manager->OnFindInPageResult( 1133 manager->OnFindInPageResult(
1133 params.request_id, params.match_index, params.start_id, 1134 params.request_id, params.match_index, params.start_id,
1134 params.start_offset, params.end_id, params.end_offset); 1135 params.start_offset, params.end_id, params.end_offset);
1135 } 1136 }
1136 } 1137 }
1137 } 1138 }
1138 1139
1140 void RenderFrameHostImpl::OnToggleFullscreen(bool enter_fullscreen) {
1141 if (enter_fullscreen)
1142 delegate_->EnterFullscreenMode(GetLastCommittedURL().GetOrigin());
1143 else
1144 delegate_->ExitFullscreenMode();
1145
1146 // The previous call might change the fullscreen state. We need to make sure
1147 // the renderer is aware of that, which is done via the resize message.
1148 render_view_host_->WasResized();
1149 }
1150
1139 #if defined(OS_MACOSX) || defined(OS_ANDROID) 1151 #if defined(OS_MACOSX) || defined(OS_ANDROID)
1140 void RenderFrameHostImpl::OnShowPopup( 1152 void RenderFrameHostImpl::OnShowPopup(
1141 const FrameHostMsg_ShowPopup_Params& params) { 1153 const FrameHostMsg_ShowPopup_Params& params) {
1142 RenderViewHostDelegateView* view = 1154 RenderViewHostDelegateView* view =
1143 render_view_host_->delegate_->GetDelegateView(); 1155 render_view_host_->delegate_->GetDelegateView();
1144 if (view) { 1156 if (view) {
1145 view->ShowPopupMenu(this, 1157 view->ShowPopupMenu(this,
1146 params.bounds, 1158 params.bounds,
1147 params.item_height, 1159 params.item_height,
1148 params.item_font_size, 1160 params.item_font_size,
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
1618 void RenderFrameHostImpl::DidUseGeolocationPermission() { 1630 void RenderFrameHostImpl::DidUseGeolocationPermission() {
1619 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); 1631 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame();
1620 GetContentClient()->browser()->RegisterPermissionUsage( 1632 GetContentClient()->browser()->RegisterPermissionUsage(
1621 PERMISSION_GEOLOCATION, 1633 PERMISSION_GEOLOCATION,
1622 delegate_->GetAsWebContents(), 1634 delegate_->GetAsWebContents(),
1623 GetLastCommittedURL().GetOrigin(), 1635 GetLastCommittedURL().GetOrigin(),
1624 top_frame->GetLastCommittedURL().GetOrigin()); 1636 top_frame->GetLastCommittedURL().GetOrigin());
1625 } 1637 }
1626 1638
1627 } // namespace content 1639 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/browser/media/android/browser_media_player_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698