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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 26803002: Follow-ups/Tweaks for Embedded Flash Fullscreen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 7d0e6c7deb7c979c39ec12c6dcb253603b3f75e3..542760ca87e937708c7da5b77c579995d6a70626 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1643,20 +1643,15 @@ void WebContentsImpl::ShowCreatedWidget(int route_id,
RenderWidgetHostViewPort::FromRWHV(GetCreatedWidget(route_id));
if (!widget_host_view)
return;
- bool allow_privileged = false;
if (is_fullscreen) {
+ DCHECK_EQ(MSG_ROUTING_NONE, fullscreen_widget_routing_id_);
+ fullscreen_widget_routing_id_ = route_id;
if (delegate_ && delegate_->EmbedsFullscreenWidget()) {
widget_host_view->InitAsChild(GetRenderWidgetHostView()->GetNativeView());
delegate_->ToggleFullscreenModeForTab(this, true);
} else {
widget_host_view->InitAsFullscreen(GetRenderWidgetHostViewPort());
- // Only allow privileged mouse lock for fullscreen render widget, which is
- // used to implement Pepper Flash fullscreen.
- allow_privileged = true;
}
-
- DCHECK_EQ(MSG_ROUTING_NONE, fullscreen_widget_routing_id_);
- fullscreen_widget_routing_id_ = route_id;
FOR_EACH_OBSERVER(WebContentsObserver,
observers_,
DidShowFullscreenWidget(route_id));
@@ -1669,9 +1664,9 @@ void WebContentsImpl::ShowCreatedWidget(int route_id,
RenderWidgetHostImpl* render_widget_host_impl =
RenderWidgetHostImpl::From(widget_host_view->GetRenderWidgetHost());
render_widget_host_impl->Init();
- render_widget_host_impl->set_allow_privileged_mouse_lock(allow_privileged);
- // TODO(miu): For now, all mouse lock requests by embedded Flash fullscreen
- // will be denied. This is to be rectified in a soon-upcoming change.
+ // Only allow privileged mouse lock for fullscreen render widget, which is
+ // used to implement Pepper Flash fullscreen.
+ render_widget_host_impl->set_allow_privileged_mouse_lock(is_fullscreen);
#if defined(OS_MACOSX)
// A RenderWidgetHostViewMac has lifetime scoped to the view. Now that it's

Powered by Google App Engine
This is Rietveld 408576698