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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 // | 69 // |
70 bool Start(const GURL& url, | 70 bool Start(const GURL& url, |
71 char** const param_names, | 71 char** const param_names, |
72 char** const param_values, | 72 char** const param_values, |
73 int param_count, | 73 int param_count, |
74 bool load_manually); | 74 bool load_manually); |
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. |
| 80 gfx::PluginWindowHandle window_handle() const { return window_handle_; } |
| 81 void set_window_handle(gfx::PluginWindowHandle value) { |
| 82 window_handle_ = value; |
| 83 } |
| 84 |
79 // Get/Set whether this instance is transparent. This only applies to | 85 // Get/Set whether this instance is transparent. This only applies to |
80 // windowless plugins. Transparent plugins require that webkit paint the | 86 // windowless plugins. Transparent plugins require that webkit paint the |
81 // background. | 87 // background. |
82 // 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 |
83 // 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. |
84 bool transparent() { return transparent_; } | 90 bool transparent() { return transparent_; } |
85 void set_transparent(bool value) { transparent_ = value; } | 91 void set_transparent(bool value) { transparent_ = value; } |
86 | 92 |
87 // Get/Set the WebPlugin associated with this instance | 93 // Get/Set the WebPlugin associated with this instance |
88 WebPlugin* webplugin() { return webplugin_; } | 94 WebPlugin* webplugin() { return webplugin_; } |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 // NOTE: Please dont change the ordering of the member variables | 220 // NOTE: Please dont change the ordering of the member variables |
215 // New members should be added after this padding array. | 221 // New members should be added after this padding array. |
216 // TODO(iyengar) : Disassemble the Realplayer ndata structure and look into | 222 // TODO(iyengar) : Disassemble the Realplayer ndata structure and look into |
217 // 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 |
218 // 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. |
219 uint8_t zero_padding_[96]; | 225 uint8_t zero_padding_[96]; |
220 scoped_refptr<PluginLib> plugin_; | 226 scoped_refptr<PluginLib> plugin_; |
221 NPP npp_; | 227 NPP npp_; |
222 scoped_refptr<PluginHost> host_; | 228 scoped_refptr<PluginHost> host_; |
223 NPPluginFuncs* npp_functions_; | 229 NPPluginFuncs* npp_functions_; |
| 230 gfx::PluginWindowHandle window_handle_; |
224 bool transparent_; | 231 bool transparent_; |
225 WebPlugin* webplugin_; | 232 WebPlugin* webplugin_; |
226 std::string mime_type_; | 233 std::string mime_type_; |
227 bool use_mozilla_user_agent_; | 234 bool use_mozilla_user_agent_; |
228 #if defined(OS_MACOSX) | 235 #if defined(OS_MACOSX) |
229 NPDrawingModel drawing_model_; | 236 NPDrawingModel drawing_model_; |
230 NPEventModel event_model_; | 237 NPEventModel event_model_; |
231 gfx::Point plugin_origin_; | 238 gfx::Point plugin_origin_; |
232 gfx::Rect containing_window_frame_; | 239 gfx::Rect containing_window_frame_; |
233 NPCocoaEvent* currently_handled_event_; // weak | 240 NPCocoaEvent* currently_handled_event_; // weak |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 | 278 |
272 private: | 279 private: |
273 scoped_refptr<PluginInstance> instance_; | 280 scoped_refptr<PluginInstance> instance_; |
274 DISALLOW_COPY_AND_ASSIGN(ScopedCurrentPluginEvent); | 281 DISALLOW_COPY_AND_ASSIGN(ScopedCurrentPluginEvent); |
275 }; | 282 }; |
276 #endif | 283 #endif |
277 | 284 |
278 } // namespace content | 285 } // namespace content |
279 | 286 |
280 #endif // CONTENT_CHILD_NPAPI_PLUGIN_INSTANCE_H_ | 287 #endif // CONTENT_CHILD_NPAPI_PLUGIN_INSTANCE_H_ |
OLD | NEW |