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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index e310ae240da02a3c1820458dd50150b2be3fe0ae..112077afc8eaf59bc2661b99ceab4d166514c17b 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -335,6 +335,7 @@ bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) {
OnAccessibilityLocationChanges)
IPC_MESSAGE_HANDLER(AccessibilityHostMsg_FindInPageResult,
OnAccessibilityFindInPageResult)
+ IPC_MESSAGE_HANDLER(FrameHostMsg_ToggleFullscreen, OnToggleFullscreen)
#if defined(OS_MACOSX) || defined(OS_ANDROID)
IPC_MESSAGE_HANDLER(FrameHostMsg_ShowPopup, OnShowPopup)
IPC_MESSAGE_HANDLER(FrameHostMsg_HidePopup, OnHidePopup)
@@ -1136,6 +1137,17 @@ void RenderFrameHostImpl::OnAccessibilityFindInPageResult(
}
}
+void RenderFrameHostImpl::OnToggleFullscreen(bool enter_fullscreen) {
+ if (enter_fullscreen)
+ delegate_->EnterFullscreenMode(GetLastCommittedURL().GetOrigin());
+ else
+ delegate_->ExitFullscreenMode();
+
+ // The previous call might change the fullscreen state. We need to make sure
+ // the renderer is aware of that, which is done via the resize message.
+ render_view_host_->WasResized();
+}
+
#if defined(OS_MACOSX) || defined(OS_ANDROID)
void RenderFrameHostImpl::OnShowPopup(
const FrameHostMsg_ShowPopup_Params& params) {
« 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