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

Unified Diff: webkit/plugins/ppapi/ppapi_plugin_instance.cc

Issue 8273029: PPAPI Fullscreen: In ViewChanged, check if the browser entered fullscreen mode (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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: webkit/plugins/ppapi/ppapi_plugin_instance.cc
===================================================================
--- webkit/plugins/ppapi/ppapi_plugin_instance.cc (revision 105467)
+++ webkit/plugins/ppapi/ppapi_plugin_instance.cc (working copy)
@@ -115,6 +115,7 @@
using WebKit::WebCursorInfo;
using WebKit::WebDocument;
using WebKit::WebFrame;
+using WebKit::WebElement;
using WebKit::WebInputEvent;
using WebKit::WebPluginContainer;
using WebKit::WebString;
@@ -237,7 +238,7 @@
if (!instance)
return false;
- WebKit::WebElement plugin_element = instance->container()->element();
+ WebElement plugin_element = instance->container()->element();
*security_origin = plugin_element.document().securityOrigin();
return true;
}
@@ -736,10 +737,30 @@
if (sent_did_change_view_ && position == position_ && new_clip == clip_)
return;
+ if (desired_fullscreen_state_ || fullscreen_) {
+ WebElement element = container_->element();
+ WebDocument document = element.document();
+ // TODO(polina): temporary hack to ease WebKit/Chromium commit sequence.
+#ifdef WEBKIT_WEBDOCUMENT_HAS_FULLSCREENELEMENT
+ bool is_fullscreen_element = (element == document.fullScreenElement());
+#else
+ bool is_fullscreen_element = desired_fullscreen_state_;
+#endif
+ if (!fullscreen_ && desired_fullscreen_state_ &&
+ delegate()->IsInFullscreenMode() && is_fullscreen_element) {
+ // Entered fullscreen. Only possible via SetFullscreen.
+ fullscreen_ = true;
+ } else if (fullscreen_ && !is_fullscreen_element) {
+ // Exited fullscreen. Possible via SetFullscreen or F11,
+ // so desired_fullscreen_state might be out-of-date.
+ desired_fullscreen_state_ = false;
+ fullscreen_ = false;
+ }
+ }
+
sent_did_change_view_ = true;
position_ = position;
clip_ = new_clip;
- fullscreen_ = desired_fullscreen_state_;
flash_fullscreen_ = (fullscreen_container_ != NULL);
PP_Rect pp_position, pp_clip;
@@ -1901,7 +1922,7 @@
if (!relative_string)
return PP_MakeNull();
- WebKit::WebElement plugin_element = container()->element();
+ WebElement plugin_element = container()->element();
GURL document_url = plugin_element.document().baseURL();
return ::ppapi::URLUtilImpl::GenerateURLReturn(
module()->pp_module(),
« content/renderer/render_view_impl.cc ('K') | « webkit/plugins/ppapi/plugin_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698