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

Unified Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2021513002: Move willEnterFullscreen to WebRemoteFrame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment about user gestures Created 4 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.h ('k') | third_party/WebKit/public/web/WebRemoteFrame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index 76fa9d1908fa0c4ac497386d16303e86cb8bbd11..64f7f1ae03c824045b833533a293c355b2636ffb 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -1947,35 +1947,6 @@ void WebViewImpl::resize(const WebSize& newSize)
newSize, topControls().height(), topControls().shrinkViewport());
}
-void WebViewImpl::willEnterFullScreen(WebRemoteFrame* fullscreenFrame)
-{
- FrameOwner* owner = toWebRemoteFrameImpl(fullscreenFrame)->frame()->owner();
- HTMLFrameOwnerElement* ownerElement = toHTMLFrameOwnerElement(owner);
-
- // Let FullscreenController know that |ownerElement| is an ancestor of the
- // actual fullscreen element, so that it can be treated a little
- // differently:
- // - it will need :-webkit-full-screen-ancestor style in addition to
- // :-webkit-full-screen.
- // - it does not need to resend the ToggleFullscreen IPC to the browser
- // process.
- m_fullscreenController->setFullscreenIsForCrossProcessAncestor();
-
- // Call requestFullscreen() on |ownerElement| to make it the provisional
- // fullscreen element in FullscreenController, and to prepare
- // fullscreenchange events that will need to fire on it and its (local)
- // ancestors. The events will be triggered if/when fullscreen is entered.
- // Note that requestFullscreen() requires a user gesture.
- //
- // TODO(alexmos): currently, this assumes prefixed requests, but in the
- // future, this should plumb in information about which request type
- // (prefixed or unprefixed) to use for firing fullscreen events.
- {
- WebScopedUserGesture userGesture;
- Fullscreen::from(ownerElement->document()).requestFullscreen(*ownerElement, Fullscreen::PrefixedRequest);
- }
-}
-
void WebViewImpl::didEnterFullScreen()
{
m_fullscreenController->didEnterFullScreen();
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.h ('k') | third_party/WebKit/public/web/WebRemoteFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698