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

Side by Side Diff: webkit/plugins/ppapi/ppapi_plugin_instance.h

Issue 7714017: Reimplement the Pepper fullscreen API to use webkitRequestFullScreen and friends. (Closed) Base URL: ssh://matter.syd/usr/local/google/chromium2/src@master
Patch Set: Created 9 years, 4 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 unified diff | Download patch
OLDNEW
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 class WebPluginContainer; 56 class WebPluginContainer;
57 } 57 }
58 58
59 namespace ppapi { 59 namespace ppapi {
60 struct PPP_Instance_Combined; 60 struct PPP_Instance_Combined;
61 } 61 }
62 62
63 namespace webkit { 63 namespace webkit {
64 namespace ppapi { 64 namespace ppapi {
65 65
66 class FullscreenContainer;
67 class MessageChannel; 66 class MessageChannel;
68 class ObjectVar; 67 class ObjectVar;
69 class PluginDelegate; 68 class PluginDelegate;
70 class PluginModule; 69 class PluginModule;
71 class PluginObject; 70 class PluginObject;
72 class PPB_Graphics2D_Impl; 71 class PPB_Graphics2D_Impl;
73 class PPB_Graphics3D_Impl; 72 class PPB_Graphics3D_Impl;
74 class PPB_ImageData_Impl; 73 class PPB_ImageData_Impl;
75 class PPB_Surface3D_Impl; 74 class PPB_Surface3D_Impl;
76 class PPB_URLLoader_Impl; 75 class PPB_URLLoader_Impl;
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 234
236 // Implementation of PPP_Messaging. 235 // Implementation of PPP_Messaging.
237 void HandleMessage(PP_Var message); 236 void HandleMessage(PP_Var message);
238 237
239 PluginDelegate::PlatformContext3D* CreateContext3D(); 238 PluginDelegate::PlatformContext3D* CreateContext3D();
240 239
241 // Returns true iff the plugin is a full-page plugin (i.e. not in an iframe or 240 // Returns true iff the plugin is a full-page plugin (i.e. not in an iframe or
242 // embedded in a page). 241 // embedded in a page).
243 bool IsFullPagePlugin() const; 242 bool IsFullPagePlugin() const;
244 243
245 FullscreenContainer* fullscreen_container() const {
246 return fullscreen_container_;
247 }
248
249 // FunctionGroupBase overrides. 244 // FunctionGroupBase overrides.
250 virtual ::ppapi::thunk::PPB_Instance_FunctionAPI* AsPPB_Instance_FunctionAPI() 245 virtual ::ppapi::thunk::PPB_Instance_FunctionAPI* AsPPB_Instance_FunctionAPI()
251 OVERRIDE; 246 OVERRIDE;
252 247
253 // PPB_Instance_API implementation. 248 // PPB_Instance_API implementation.
254 virtual PP_Bool BindGraphics(PP_Instance instance, 249 virtual PP_Bool BindGraphics(PP_Instance instance,
255 PP_Resource device) OVERRIDE; 250 PP_Resource device) OVERRIDE;
256 virtual PP_Bool IsFullFrame(PP_Instance instance) OVERRIDE; 251 virtual PP_Bool IsFullFrame(PP_Instance instance) OVERRIDE;
257 virtual PP_Var GetWindowObject(PP_Instance instance) OVERRIDE; 252 virtual PP_Var GetWindowObject(PP_Instance instance) OVERRIDE;
258 virtual PP_Var GetOwnerElementObject(PP_Instance instance) OVERRIDE; 253 virtual PP_Var GetOwnerElementObject(PP_Instance instance) OVERRIDE;
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 // The plugin 3D interface. 455 // The plugin 3D interface.
461 const PPP_Graphics3D_Dev* plugin_graphics_3d_interface_; 456 const PPP_Graphics3D_Dev* plugin_graphics_3d_interface_;
462 457
463 // Contains the cursor if it's set by the plugin. 458 // Contains the cursor if it's set by the plugin.
464 scoped_ptr<WebKit::WebCursorInfo> cursor_; 459 scoped_ptr<WebKit::WebCursorInfo> cursor_;
465 460
466 // Set to true if this plugin thinks it will always be on top. This allows us 461 // Set to true if this plugin thinks it will always be on top. This allows us
467 // to use a more optimized painting path in some cases. 462 // to use a more optimized painting path in some cases.
468 bool always_on_top_; 463 bool always_on_top_;
469 464
470 // Plugin container for fullscreen mode. NULL if not in fullscreen mode. Note: 465 // Since entering fullscreen mode is an asynchronous operation, we set this
471 // there is a transition state where fullscreen_container_ is non-NULL but 466 // variable to the desired state at the time we issue the fullscreen change
472 // fullscreen_ is false (see above). 467 // request.
brettw 2011/08/24 23:14:04 It might be nice to mention here how you tell if t
jeremya 2011/08/24 23:40:45 Done.
473 FullscreenContainer* fullscreen_container_; 468 bool desired_fullscreen_state_;
474 469
475 // True if we are in fullscreen mode. Note: it is false during the transition. 470 // True if we are in fullscreen mode. Note: it is false during the transition.
476 bool fullscreen_; 471 bool fullscreen_;
477 472
478 // The MessageChannel used to implement bidirectional postMessage for the 473 // The MessageChannel used to implement bidirectional postMessage for the
479 // instance. 474 // instance.
480 scoped_ptr<MessageChannel> message_channel_; 475 scoped_ptr<MessageChannel> message_channel_;
481 476
482 // Bitmap for crashed plugin. Lazily initialized, non-owning pointer. 477 // Bitmap for crashed plugin. Lazily initialized, non-owning pointer.
483 SkBitmap* sad_plugin_; 478 SkBitmap* sad_plugin_;
484 479
485 typedef std::set<PluginObject*> PluginObjectSet; 480 typedef std::set<PluginObject*> PluginObjectSet;
486 PluginObjectSet live_plugin_objects_; 481 PluginObjectSet live_plugin_objects_;
487 482
488 // Classes of events that the plugin has registered for, both for filtering 483 // Classes of events that the plugin has registered for, both for filtering
489 // and not. The bits are PP_INPUTEVENT_CLASS_*. 484 // and not. The bits are PP_INPUTEVENT_CLASS_*.
490 uint32_t input_event_mask_; 485 uint32_t input_event_mask_;
491 uint32_t filtered_input_event_mask_; 486 uint32_t filtered_input_event_mask_;
492 487
493 DISALLOW_COPY_AND_ASSIGN(PluginInstance); 488 DISALLOW_COPY_AND_ASSIGN(PluginInstance);
494 }; 489 };
495 490
496 } // namespace ppapi 491 } // namespace ppapi
497 } // namespace webkit 492 } // namespace webkit
498 493
499 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ 494 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698