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 | |
85 // Get/Set whether this instance is transparent. This only applies to | 79 // Get/Set whether this instance is transparent. This only applies to |
86 // windowless plugins. Transparent plugins require that webkit paint the | 80 // windowless plugins. Transparent plugins require that webkit paint the |
87 // background. | 81 // background. |
88 // Default is true for all plugins other than Flash. For Flash, we default to | 82 // Default is true for all plugins other than Flash. For Flash, we default to |
89 // opaque since it always tells us if it's transparent during NPP_New. | 83 // opaque since it always tells us if it's transparent during NPP_New. |
90 bool transparent() { return transparent_; } | 84 bool transparent() { return transparent_; } |
91 void set_transparent(bool value) { transparent_ = value; } | 85 void set_transparent(bool value) { transparent_ = value; } |
92 | 86 |
93 // Get/Set the WebPlugin associated with this instance | 87 // Get/Set the WebPlugin associated with this instance |
94 WebPlugin* webplugin() { return webplugin_; } | 88 WebPlugin* webplugin() { return webplugin_; } |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 // NOTE: Please dont change the ordering of the member variables | 214 // NOTE: Please dont change the ordering of the member variables |
221 // New members should be added after this padding array. | 215 // New members should be added after this padding array. |
222 // TODO(iyengar) : Disassemble the Realplayer ndata structure and look into | 216 // TODO(iyengar) : Disassemble the Realplayer ndata structure and look into |
223 // the possiblity of conforming to it (http://b/issue?id=936667). We | 217 // the possiblity of conforming to it (http://b/issue?id=936667). We |
224 // could also log a bug with Real, which would save the effort. | 218 // could also log a bug with Real, which would save the effort. |
225 uint8_t zero_padding_[96]; | 219 uint8_t zero_padding_[96]; |
226 scoped_refptr<PluginLib> plugin_; | 220 scoped_refptr<PluginLib> plugin_; |
227 NPP npp_; | 221 NPP npp_; |
228 scoped_refptr<PluginHost> host_; | 222 scoped_refptr<PluginHost> host_; |
229 NPPluginFuncs* npp_functions_; | 223 NPPluginFuncs* npp_functions_; |
230 gfx::PluginWindowHandle window_handle_; | |
231 bool transparent_; | 224 bool transparent_; |
232 WebPlugin* webplugin_; | 225 WebPlugin* webplugin_; |
233 std::string mime_type_; | 226 std::string mime_type_; |
234 bool use_mozilla_user_agent_; | 227 bool use_mozilla_user_agent_; |
235 #if defined(OS_MACOSX) | 228 #if defined(OS_MACOSX) |
236 NPDrawingModel drawing_model_; | 229 NPDrawingModel drawing_model_; |
237 NPEventModel event_model_; | 230 NPEventModel event_model_; |
238 gfx::Point plugin_origin_; | 231 gfx::Point plugin_origin_; |
239 gfx::Rect containing_window_frame_; | 232 gfx::Rect containing_window_frame_; |
240 NPCocoaEvent* currently_handled_event_; // weak | 233 NPCocoaEvent* currently_handled_event_; // weak |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 | 271 |
279 private: | 272 private: |
280 scoped_refptr<PluginInstance> instance_; | 273 scoped_refptr<PluginInstance> instance_; |
281 DISALLOW_COPY_AND_ASSIGN(ScopedCurrentPluginEvent); | 274 DISALLOW_COPY_AND_ASSIGN(ScopedCurrentPluginEvent); |
282 }; | 275 }; |
283 #endif | 276 #endif |
284 | 277 |
285 } // namespace content | 278 } // namespace content |
286 | 279 |
287 #endif // CONTENT_CHILD_NPAPI_PLUGIN_INSTANCE_H_ | 280 #endif // CONTENT_CHILD_NPAPI_PLUGIN_INSTANCE_H_ |
OLD | NEW |