| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 WEBKIT_GLUE_PLUGIN_PLUGIN_INSTANCE_H__ | 8 #ifndef WEBKIT_GLUE_PLUGIN_PLUGIN_INSTANCE_H__ |
| 9 #define WEBKIT_GLUE_PLUGIN_PLUGIN_INSTANCE_H__ | 9 #define WEBKIT_GLUE_PLUGIN_PLUGIN_INSTANCE_H__ |
| 10 | 10 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 webkit_glue::WebPlugin* webplugin() { return webplugin_; } | 93 webkit_glue::WebPlugin* webplugin() { return webplugin_; } |
| 94 void set_web_plugin(webkit_glue::WebPlugin* webplugin) { | 94 void set_web_plugin(webkit_glue::WebPlugin* webplugin) { |
| 95 webplugin_ = webplugin; | 95 webplugin_ = webplugin; |
| 96 } | 96 } |
| 97 | 97 |
| 98 // Get the mimeType for this plugin stream | 98 // Get the mimeType for this plugin stream |
| 99 const std::string &mime_type() { return mime_type_; } | 99 const std::string &mime_type() { return mime_type_; } |
| 100 | 100 |
| 101 NPAPI::PluginLib* plugin_lib() { return plugin_; } | 101 NPAPI::PluginLib* plugin_lib() { return plugin_; } |
| 102 | 102 |
| 103 #if defined(OS_MACOSX) |
| 104 // Get/Set the Mac NPAPI drawing and event models |
| 105 int drawing_model() { return drawing_model_; } |
| 106 void set_drawing_model(int value) { drawing_model_ = value; } |
| 107 int event_model() { return event_model_; } |
| 108 void set_event_model(int value) { event_model_ = value; } |
| 109 #endif |
| 110 |
| 103 #if defined(PEPPER_APIS_ENABLED) | 111 #if defined(PEPPER_APIS_ENABLED) |
| 104 NPError InitializeRenderContext(NPRenderType type, | 112 NPError InitializeRenderContext(NPRenderType type, |
| 105 NPRenderContext* context); | 113 NPRenderContext* context); |
| 106 NPError FlushRenderContext(NPRenderContext* context, | 114 NPError FlushRenderContext(NPRenderContext* context, |
| 107 NPFlushRenderContextCallbackPtr callback, | 115 NPFlushRenderContextCallbackPtr callback, |
| 108 void* userData); | 116 void* userData); |
| 109 | 117 |
| 110 #endif // defined(PEPPER_APIS_ENABLED) | 118 #endif // defined(PEPPER_APIS_ENABLED) |
| 111 | 119 |
| 112 // Creates a stream for sending an URL. If notify_needed | 120 // Creates a stream for sending an URL. If notify_needed |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 NPPluginFuncs* npp_functions_; | 231 NPPluginFuncs* npp_functions_; |
| 224 std::vector<scoped_refptr<PluginStream> > open_streams_; | 232 std::vector<scoped_refptr<PluginStream> > open_streams_; |
| 225 gfx::PluginWindowHandle window_handle_; | 233 gfx::PluginWindowHandle window_handle_; |
| 226 bool windowless_; | 234 bool windowless_; |
| 227 bool transparent_; | 235 bool transparent_; |
| 228 webkit_glue::WebPlugin* webplugin_; | 236 webkit_glue::WebPlugin* webplugin_; |
| 229 std::string mime_type_; | 237 std::string mime_type_; |
| 230 GURL get_url_; | 238 GURL get_url_; |
| 231 intptr_t get_notify_data_; | 239 intptr_t get_notify_data_; |
| 232 bool use_mozilla_user_agent_; | 240 bool use_mozilla_user_agent_; |
| 241 #if defined(OS_MACOSX) |
| 242 int drawing_model_; |
| 243 int event_model_; |
| 244 #endif |
| 233 MessageLoop* message_loop_; | 245 MessageLoop* message_loop_; |
| 234 scoped_refptr<PluginStreamUrl> plugin_data_stream_; | 246 scoped_refptr<PluginStreamUrl> plugin_data_stream_; |
| 235 | 247 |
| 236 // This flag if true indicates that the plugin data would be passed from | 248 // This flag if true indicates that the plugin data would be passed from |
| 237 // webkit. if false indicates that the plugin should download the data. | 249 // webkit. if false indicates that the plugin should download the data. |
| 238 bool load_manually_; | 250 bool load_manually_; |
| 239 | 251 |
| 240 // Stack indicating if popups are to be enabled for the outgoing | 252 // Stack indicating if popups are to be enabled for the outgoing |
| 241 // NPN_GetURL/NPN_GetURLNotify calls. | 253 // NPN_GetURL/NPN_GetURLNotify calls. |
| 242 std::stack<bool> popups_enabled_stack_; | 254 std::stack<bool> popups_enabled_stack_; |
| 243 | 255 |
| 244 // True if in CloseStreams(). | 256 // True if in CloseStreams(). |
| 245 bool in_close_streams_; | 257 bool in_close_streams_; |
| 246 | 258 |
| 247 // List of files created for the current plugin instance. File names are | 259 // List of files created for the current plugin instance. File names are |
| 248 // added to the list every time the NPP_StreamAsFile function is called. | 260 // added to the list every time the NPP_StreamAsFile function is called. |
| 249 std::vector<FilePath> files_created_; | 261 std::vector<FilePath> files_created_; |
| 250 | 262 |
| 251 DISALLOW_EVIL_CONSTRUCTORS(PluginInstance); | 263 DISALLOW_EVIL_CONSTRUCTORS(PluginInstance); |
| 252 }; | 264 }; |
| 253 | 265 |
| 254 } // namespace NPAPI | 266 } // namespace NPAPI |
| 255 | 267 |
| 256 #endif // WEBKIT_GLUE_PLUGIN_PLUGIN_INSTANCE_H__ | 268 #endif // WEBKIT_GLUE_PLUGIN_PLUGIN_INSTANCE_H__ |
| OLD | NEW |