| Index: webkit/plugins/ppapi/ppapi_plugin_instance.h
|
| ===================================================================
|
| --- webkit/plugins/ppapi/ppapi_plugin_instance.h (revision 99979)
|
| +++ webkit/plugins/ppapi/ppapi_plugin_instance.h (working copy)
|
| @@ -207,19 +207,49 @@
|
|
|
| void Graphics3DContextLost();
|
|
|
| + // There are 2 implementations of the fullscreen interface. PPB_Fullscreen_Dev
|
| + // is used by Pepper Flash. PPB_Fullscreen is intended for other applications
|
| + // including NaCl. The two interface are mutually exclusive.
|
| +
|
| // Implementation of PPB_Fullscreen_Dev.
|
|
|
| // Because going to fullscreen is asynchronous (but going out is not), there
|
| // are 3 states:
|
| - // - normal (fullscreen_container_ == NULL)
|
| - // - fullscreen pending (fullscreen_container_ != NULL, fullscreen_ == false)
|
| - // - fullscreen (fullscreen_container_ != NULL, fullscreen_ = true)
|
| + // - normal : fullscreen_container_ == NULL
|
| + // fullscreen_dev_ == false
|
| + // - fullscreen pending: fullscreen_container_ != NULL
|
| + // fullscreen_dev_ == false
|
| + // - fullscreen : fullscreen_container_ != NULL
|
| + // fullscreen_dev_ == true
|
| //
|
| // In normal state, events come from webkit and painting goes back to it.
|
| // In fullscreen state, events come from the fullscreen container, and
|
| - // painting goes back to it
|
| + // painting goes back to it.
|
| // In pending state, events from webkit are ignored, and as soon as we receive
|
| // events from the fullscreen container, we go to the fullscreen state.
|
| + bool IsFullscreenOrPending_Dev();
|
| +
|
| + // Switches between fullscreen and normal mode. If |delay_report| is set to
|
| + // false, it may report the new state through DidChangeView immediately. If
|
| + // true, it will delay it. When called from the plugin, delay_report should be
|
| + // true to avoid re-entrancy.
|
| + void SetFullscreen_Dev(bool fullscreen, bool delay_report);
|
| +
|
| + FullscreenContainer* fullscreen_container() const {
|
| + return fullscreen_container_;
|
| + }
|
| +
|
| + // Implementation of PPB_Fullscreen.
|
| +
|
| + // Because going to/from fullscreen is asynchronous, there are 4 states:
|
| + // - normal : desired_fullscreen_state_ == false
|
| + // fullscreen_ == false
|
| + // - fullscreen pending: desired_fullscreen_state_ == true
|
| + // fullscreen_ == false
|
| + // - fullscreen : desired_fullscreen_state_ == true
|
| + // fullscreen_ == true
|
| + // - normal pending : desired_fullscreen_state_ = false
|
| + // fullscreen_ = true
|
| bool IsFullscreenOrPending();
|
|
|
| // Switches between fullscreen and normal mode. If |delay_report| is set to
|
| @@ -242,15 +272,11 @@
|
| // embedded in a page).
|
| bool IsFullPagePlugin() const;
|
|
|
| - FullscreenContainer* fullscreen_container() const {
|
| - return fullscreen_container_;
|
| - }
|
| -
|
| // FunctionGroupBase overrides.
|
| virtual ::ppapi::thunk::PPB_Instance_FunctionAPI* AsPPB_Instance_FunctionAPI()
|
| OVERRIDE;
|
|
|
| - // PPB_Instance_API implementation.
|
| + // PPB_Instance_FunctionAPI implementation.
|
| virtual PP_Bool BindGraphics(PP_Instance instance,
|
| PP_Resource device) OVERRIDE;
|
| virtual PP_Bool IsFullFrame(PP_Instance instance) OVERRIDE;
|
| @@ -260,9 +286,14 @@
|
| PP_Var script,
|
| PP_Var* exception) OVERRIDE;
|
| virtual PP_Bool IsFullscreen(PP_Instance instance) OVERRIDE;
|
| + virtual PP_Bool IsFullscreen_Dev(PP_Instance instance) OVERRIDE;
|
| virtual PP_Bool SetFullscreen(PP_Instance instance,
|
| PP_Bool fullscreen) OVERRIDE;
|
| + virtual PP_Bool SetFullscreen_Dev(PP_Instance instance,
|
| + PP_Bool fullscreen) OVERRIDE;
|
| virtual PP_Bool GetScreenSize(PP_Instance instance, PP_Size* size) OVERRIDE;
|
| + virtual PP_Bool GetScreenSize_Dev(PP_Instance instance, PP_Size* size)
|
| + OVERRIDE;
|
| virtual int32_t RequestInputEvents(PP_Instance instance,
|
| uint32_t event_classes) OVERRIDE;
|
| virtual int32_t RequestFilteringInputEvents(PP_Instance instance,
|
| @@ -441,12 +472,27 @@
|
| // to use a more optimized painting path in some cases.
|
| bool always_on_top_;
|
|
|
| + // Implementation of PPB_Fullscreen_Dev.
|
| +
|
| // Plugin container for fullscreen mode. NULL if not in fullscreen mode. Note:
|
| // there is a transition state where fullscreen_container_ is non-NULL but
|
| // fullscreen_ is false (see above).
|
| FullscreenContainer* fullscreen_container_;
|
|
|
| - // True if we are in fullscreen mode. Note: it is false during the transition.
|
| + // True if we are in fullscreen mode. False if we are in normal mode or
|
| + // in transition to fullscreen.
|
| + bool fullscreen_dev_;
|
| +
|
| + // Implementation of PPB_Fullscreen.
|
| +
|
| + // Since entering fullscreen mode is an asynchronous operation, we set this
|
| + // variable to the desired state at the time we issue the fullscreen change
|
| + // request. The plugin will receive a DidChangeView event when it goes
|
| + // fullscreen.
|
| + bool desired_fullscreen_state_;
|
| +
|
| + // True if we are in fullscreen mode. False if we are in normal mode.
|
| + // It reflects the previous state when in transition.
|
| bool fullscreen_;
|
|
|
| // The MessageChannel used to implement bidirectional postMessage for the
|
|
|