| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 } | 57 } |
| 58 | 58 |
| 59 namespace ppapi { | 59 namespace ppapi { |
| 60 struct PPP_Instance_Combined; | 60 struct PPP_Instance_Combined; |
| 61 class Resource; | 61 class Resource; |
| 62 } | 62 } |
| 63 | 63 |
| 64 namespace webkit { | 64 namespace webkit { |
| 65 namespace ppapi { | 65 namespace ppapi { |
| 66 | 66 |
| 67 class FullscreenContainer; |
| 67 class MessageChannel; | 68 class MessageChannel; |
| 68 class ObjectVar; | 69 class ObjectVar; |
| 69 class PluginDelegate; | 70 class PluginDelegate; |
| 70 class PluginModule; | 71 class PluginModule; |
| 71 class PluginObject; | 72 class PluginObject; |
| 72 class PPB_Graphics2D_Impl; | 73 class PPB_Graphics2D_Impl; |
| 73 class PPB_Graphics3D_Impl; | 74 class PPB_Graphics3D_Impl; |
| 74 class PPB_ImageData_Impl; | 75 class PPB_ImageData_Impl; |
| 75 class PPB_Surface3D_Impl; | 76 class PPB_Surface3D_Impl; |
| 76 class PPB_URLLoader_Impl; | 77 class PPB_URLLoader_Impl; |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 | 235 |
| 235 // Implementation of PPP_Messaging. | 236 // Implementation of PPP_Messaging. |
| 236 void HandleMessage(PP_Var message); | 237 void HandleMessage(PP_Var message); |
| 237 | 238 |
| 238 PluginDelegate::PlatformContext3D* CreateContext3D(); | 239 PluginDelegate::PlatformContext3D* CreateContext3D(); |
| 239 | 240 |
| 240 // Returns true iff the plugin is a full-page plugin (i.e. not in an iframe or | 241 // Returns true iff the plugin is a full-page plugin (i.e. not in an iframe or |
| 241 // embedded in a page). | 242 // embedded in a page). |
| 242 bool IsFullPagePlugin() const; | 243 bool IsFullPagePlugin() const; |
| 243 | 244 |
| 245 FullscreenContainer* fullscreen_container() const { |
| 246 return fullscreen_container_; |
| 247 } |
| 248 |
| 244 // FunctionGroupBase overrides. | 249 // FunctionGroupBase overrides. |
| 245 virtual ::ppapi::thunk::PPB_Instance_FunctionAPI* AsPPB_Instance_FunctionAPI() | 250 virtual ::ppapi::thunk::PPB_Instance_FunctionAPI* AsPPB_Instance_FunctionAPI() |
| 246 OVERRIDE; | 251 OVERRIDE; |
| 247 | 252 |
| 248 // PPB_Instance_API implementation. | 253 // PPB_Instance_API implementation. |
| 249 virtual PP_Bool BindGraphics(PP_Instance instance, | 254 virtual PP_Bool BindGraphics(PP_Instance instance, |
| 250 PP_Resource device) OVERRIDE; | 255 PP_Resource device) OVERRIDE; |
| 251 virtual PP_Bool IsFullFrame(PP_Instance instance) OVERRIDE; | 256 virtual PP_Bool IsFullFrame(PP_Instance instance) OVERRIDE; |
| 252 virtual PP_Var GetWindowObject(PP_Instance instance) OVERRIDE; | 257 virtual PP_Var GetWindowObject(PP_Instance instance) OVERRIDE; |
| 253 virtual PP_Var GetOwnerElementObject(PP_Instance instance) OVERRIDE; | 258 virtual PP_Var GetOwnerElementObject(PP_Instance instance) OVERRIDE; |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 // The plugin 3D interface. | 429 // The plugin 3D interface. |
| 425 const PPP_Graphics3D_Dev* plugin_graphics_3d_interface_; | 430 const PPP_Graphics3D_Dev* plugin_graphics_3d_interface_; |
| 426 | 431 |
| 427 // Contains the cursor if it's set by the plugin. | 432 // Contains the cursor if it's set by the plugin. |
| 428 scoped_ptr<WebKit::WebCursorInfo> cursor_; | 433 scoped_ptr<WebKit::WebCursorInfo> cursor_; |
| 429 | 434 |
| 430 // Set to true if this plugin thinks it will always be on top. This allows us | 435 // Set to true if this plugin thinks it will always be on top. This allows us |
| 431 // to use a more optimized painting path in some cases. | 436 // to use a more optimized painting path in some cases. |
| 432 bool always_on_top_; | 437 bool always_on_top_; |
| 433 | 438 |
| 434 // Since entering fullscreen mode is an asynchronous operation, we set this | 439 // Plugin container for fullscreen mode. NULL if not in fullscreen mode. Note: |
| 435 // variable to the desired state at the time we issue the fullscreen change | 440 // there is a transition state where fullscreen_container_ is non-NULL but |
| 436 // request. The plugin will receive a DidChangeView event when it goes | 441 // fullscreen_ is false (see above). |
| 437 // fullscreen. | 442 FullscreenContainer* fullscreen_container_; |
| 438 bool desired_fullscreen_state_; | |
| 439 | 443 |
| 440 // True if we are in fullscreen mode. Note: it is false during the transition. | 444 // True if we are in fullscreen mode. Note: it is false during the transition. |
| 441 bool fullscreen_; | 445 bool fullscreen_; |
| 442 | 446 |
| 443 // The MessageChannel used to implement bidirectional postMessage for the | 447 // The MessageChannel used to implement bidirectional postMessage for the |
| 444 // instance. | 448 // instance. |
| 445 scoped_ptr<MessageChannel> message_channel_; | 449 scoped_ptr<MessageChannel> message_channel_; |
| 446 | 450 |
| 447 // Bitmap for crashed plugin. Lazily initialized, non-owning pointer. | 451 // Bitmap for crashed plugin. Lazily initialized, non-owning pointer. |
| 448 SkBitmap* sad_plugin_; | 452 SkBitmap* sad_plugin_; |
| 449 | 453 |
| 450 typedef std::set<PluginObject*> PluginObjectSet; | 454 typedef std::set<PluginObject*> PluginObjectSet; |
| 451 PluginObjectSet live_plugin_objects_; | 455 PluginObjectSet live_plugin_objects_; |
| 452 | 456 |
| 453 // Classes of events that the plugin has registered for, both for filtering | 457 // Classes of events that the plugin has registered for, both for filtering |
| 454 // and not. The bits are PP_INPUTEVENT_CLASS_*. | 458 // and not. The bits are PP_INPUTEVENT_CLASS_*. |
| 455 uint32_t input_event_mask_; | 459 uint32_t input_event_mask_; |
| 456 uint32_t filtered_input_event_mask_; | 460 uint32_t filtered_input_event_mask_; |
| 457 | 461 |
| 458 DISALLOW_COPY_AND_ASSIGN(PluginInstance); | 462 DISALLOW_COPY_AND_ASSIGN(PluginInstance); |
| 459 }; | 463 }; |
| 460 | 464 |
| 461 } // namespace ppapi | 465 } // namespace ppapi |
| 462 } // namespace webkit | 466 } // namespace webkit |
| 463 | 467 |
| 464 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ | 468 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
| OLD | NEW |