OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // TODO: Need to deal with NPAPI's NPSavedData. | 5 // TODO: Need to deal with NPAPI's NPSavedData. |
6 // I haven't seen plugins use it yet. | 6 // I haven't seen plugins use it yet. |
7 | 7 |
8 #ifndef CONTENT_CHILD_NPAPI_PLUGIN_INSTANCE_H_ | 8 #ifndef CONTENT_CHILD_NPAPI_PLUGIN_INSTANCE_H_ |
9 #define CONTENT_CHILD_NPAPI_PLUGIN_INSTANCE_H_ | 9 #define CONTENT_CHILD_NPAPI_PLUGIN_INSTANCE_H_ |
10 | 10 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 75 |
76 // NPAPI's instance identifier for this instance | 76 // NPAPI's instance identifier for this instance |
77 NPP npp() { return npp_; } | 77 NPP npp() { return npp_; } |
78 | 78 |
79 // Get/Set for the instance's window handle. | 79 // Get/Set for the instance's window handle. |
80 gfx::PluginWindowHandle window_handle() const { return window_handle_; } | 80 gfx::PluginWindowHandle window_handle() const { return window_handle_; } |
81 void set_window_handle(gfx::PluginWindowHandle value) { | 81 void set_window_handle(gfx::PluginWindowHandle value) { |
82 window_handle_ = value; | 82 window_handle_ = value; |
83 } | 83 } |
84 | 84 |
85 // Get/Set whether this instance is in Windowless mode. | |
86 // Default is false. | |
87 bool windowless() { return windowless_; } | |
88 void set_windowless(bool value) { windowless_ = value; } | |
89 | |
90 // Get/Set whether this instance is transparent. This only applies to | 85 // Get/Set whether this instance is transparent. This only applies to |
91 // windowless plugins. Transparent plugins require that webkit paint the | 86 // windowless plugins. Transparent plugins require that webkit paint the |
92 // background. | 87 // background. |
93 // Default is true for all plugins other than Flash. For Flash, we default to | 88 // Default is true for all plugins other than Flash. For Flash, we default to |
94 // opaque since it always tells us if it's transparent during NPP_New. | 89 // opaque since it always tells us if it's transparent during NPP_New. |
95 bool transparent() { return transparent_; } | 90 bool transparent() { return transparent_; } |
96 void set_transparent(bool value) { transparent_ = value; } | 91 void set_transparent(bool value) { transparent_ = value; } |
97 | 92 |
98 // Get/Set the WebPlugin associated with this instance | 93 // Get/Set the WebPlugin associated with this instance |
99 WebPlugin* webplugin() { return webplugin_; } | 94 WebPlugin* webplugin() { return webplugin_; } |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 // New members should be added after this padding array. | 221 // New members should be added after this padding array. |
227 // TODO(iyengar) : Disassemble the Realplayer ndata structure and look into | 222 // TODO(iyengar) : Disassemble the Realplayer ndata structure and look into |
228 // the possiblity of conforming to it (http://b/issue?id=936667). We | 223 // the possiblity of conforming to it (http://b/issue?id=936667). We |
229 // could also log a bug with Real, which would save the effort. | 224 // could also log a bug with Real, which would save the effort. |
230 uint8_t zero_padding_[96]; | 225 uint8_t zero_padding_[96]; |
231 scoped_refptr<PluginLib> plugin_; | 226 scoped_refptr<PluginLib> plugin_; |
232 NPP npp_; | 227 NPP npp_; |
233 scoped_refptr<PluginHost> host_; | 228 scoped_refptr<PluginHost> host_; |
234 NPPluginFuncs* npp_functions_; | 229 NPPluginFuncs* npp_functions_; |
235 gfx::PluginWindowHandle window_handle_; | 230 gfx::PluginWindowHandle window_handle_; |
236 bool windowless_; | |
237 bool transparent_; | 231 bool transparent_; |
238 WebPlugin* webplugin_; | 232 WebPlugin* webplugin_; |
239 std::string mime_type_; | 233 std::string mime_type_; |
240 bool use_mozilla_user_agent_; | 234 bool use_mozilla_user_agent_; |
241 #if defined(OS_MACOSX) | 235 #if defined(OS_MACOSX) |
242 NPDrawingModel drawing_model_; | 236 NPDrawingModel drawing_model_; |
243 NPEventModel event_model_; | 237 NPEventModel event_model_; |
244 gfx::Point plugin_origin_; | 238 gfx::Point plugin_origin_; |
245 gfx::Rect containing_window_frame_; | 239 gfx::Rect containing_window_frame_; |
246 NPCocoaEvent* currently_handled_event_; // weak | 240 NPCocoaEvent* currently_handled_event_; // weak |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 | 278 |
285 private: | 279 private: |
286 scoped_refptr<PluginInstance> instance_; | 280 scoped_refptr<PluginInstance> instance_; |
287 DISALLOW_COPY_AND_ASSIGN(ScopedCurrentPluginEvent); | 281 DISALLOW_COPY_AND_ASSIGN(ScopedCurrentPluginEvent); |
288 }; | 282 }; |
289 #endif | 283 #endif |
290 | 284 |
291 } // namespace content | 285 } // namespace content |
292 | 286 |
293 #endif // CONTENT_CHILD_NPAPI_PLUGIN_INSTANCE_H_ | 287 #endif // CONTENT_CHILD_NPAPI_PLUGIN_INSTANCE_H_ |
OLD | NEW |