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

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
« no previous file with comments | « webkit/plugins/ppapi/plugin_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppapi_plugin_instance.cc
===================================================================
--- webkit/plugins/ppapi/ppapi_plugin_instance.cc (revision 105398)
+++ webkit/plugins/ppapi/ppapi_plugin_instance.cc (working copy)
@@ -736,10 +736,25 @@
if (sent_did_change_view_ && position == position_ && new_clip == clip_)
return;
+ if (desired_fullscreen_state_ || fullscreen_) {
+ WebKit::WebElement element = container_->element();
darin (slow to review) 2011/10/14 05:03:41 nit: add a 'using WebKit::WebElement' at the top o
polina 2011/10/14 06:54:06 Done.
+ WebKit::WebDocument document = element.document();
+ bool is_fullscreen_element = (element == document.fullScreenElement());
darin (slow to review) 2011/10/14 05:06:03 by the way, to make this easier to land, without h
polina 2011/10/14 06:54:06 Done.
+ 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;
« no previous file with comments | « webkit/plugins/ppapi/plugin_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698