| 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 |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 #include <stack> | 13 #include <stack> |
| 14 | 14 |
| 15 #include "base/basictypes.h" | 15 #include "base/basictypes.h" |
| 16 #include "base/file_path.h" | 16 #include "base/file_path.h" |
| 17 #include "base/gfx/native_widget_types.h" |
| 17 #include "base/ref_counted.h" | 18 #include "base/ref_counted.h" |
| 18 #include "base/scoped_ptr.h" | 19 #include "base/scoped_ptr.h" |
| 19 #include "webkit/glue/plugins/nphostapi.h" | 20 #include "webkit/glue/plugins/nphostapi.h" |
| 20 #include "googleurl/src/gurl.h" | 21 #include "googleurl/src/gurl.h" |
| 21 #include "third_party/npapi/bindings/npapi.h" | 22 #include "third_party/npapi/bindings/npapi.h" |
| 22 | 23 |
| 23 class WebPlugin; | 24 class WebPlugin; |
| 24 class MessageLoop; | 25 class MessageLoop; |
| 25 | 26 |
| 26 namespace NPAPI | 27 namespace NPAPI |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 // | 62 // |
| 62 bool Start(const GURL& url, | 63 bool Start(const GURL& url, |
| 63 char** const param_names, | 64 char** const param_names, |
| 64 char** const param_values, | 65 char** const param_values, |
| 65 int param_count, | 66 int param_count, |
| 66 bool load_manually); | 67 bool load_manually); |
| 67 | 68 |
| 68 // NPAPI's instance identifier for this instance | 69 // NPAPI's instance identifier for this instance |
| 69 NPP npp() { return npp_; } | 70 NPP npp() { return npp_; } |
| 70 | 71 |
| 71 #if defined(OS_WIN) | 72 // Get/Set for the instance's window handle. |
| 72 // Get/Set for the instance's HWND. | 73 gfx::NativeView window_handle() { return window_handle_; } |
| 73 HWND window_handle() { return hwnd_; } | 74 void set_window_handle(gfx::NativeView value) { window_handle_ = value; } |
| 74 void set_window_handle(HWND value) { hwnd_ = value; } | |
| 75 #endif | |
| 76 | 75 |
| 77 // Get/Set whether this instance is in Windowless mode. | 76 // Get/Set whether this instance is in Windowless mode. |
| 78 // Default is false. | 77 // Default is false. |
| 79 bool windowless() { return windowless_; } | 78 bool windowless() { return windowless_; } |
| 80 void set_windowless(bool value) { windowless_ = value; } | 79 void set_windowless(bool value) { windowless_ = value; } |
| 81 | 80 |
| 82 // Get/Set whether this instance is transparent. | 81 // Get/Set whether this instance is transparent. |
| 83 // This only applies to windowless plugins. Transparent | 82 // This only applies to windowless plugins. Transparent |
| 84 // plugins require that webkit paint the background. | 83 // plugins require that webkit paint the background. |
| 85 // Default is true. | 84 // Default is true. |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 // New members should be added after this padding array. | 216 // New members should be added after this padding array. |
| 218 // TODO(iyengar) : Disassemble the Realplayer ndata structure and look into | 217 // TODO(iyengar) : Disassemble the Realplayer ndata structure and look into |
| 219 // the possiblity of conforming to it (http://b/issue?id=936667). We | 218 // the possiblity of conforming to it (http://b/issue?id=936667). We |
| 220 // could also log a bug with Real, which would save the effort. | 219 // could also log a bug with Real, which would save the effort. |
| 221 uint8 zero_padding_[96]; | 220 uint8 zero_padding_[96]; |
| 222 scoped_refptr<NPAPI::PluginLib> plugin_; | 221 scoped_refptr<NPAPI::PluginLib> plugin_; |
| 223 NPP npp_; | 222 NPP npp_; |
| 224 scoped_refptr<PluginHost> host_; | 223 scoped_refptr<PluginHost> host_; |
| 225 NPPluginFuncs* npp_functions_; | 224 NPPluginFuncs* npp_functions_; |
| 226 std::vector<scoped_refptr<PluginStream> > open_streams_; | 225 std::vector<scoped_refptr<PluginStream> > open_streams_; |
| 227 #if defined(OS_WIN) | 226 gfx::NativeView window_handle_; |
| 228 HWND hwnd_; | |
| 229 #endif | |
| 230 bool windowless_; | 227 bool windowless_; |
| 231 bool transparent_; | 228 bool transparent_; |
| 232 WebPlugin* webplugin_; | 229 WebPlugin* webplugin_; |
| 233 std::string mime_type_; | 230 std::string mime_type_; |
| 234 GURL get_url_; | 231 GURL get_url_; |
| 235 intptr_t get_notify_data_; | 232 intptr_t get_notify_data_; |
| 236 bool use_mozilla_user_agent_; | 233 bool use_mozilla_user_agent_; |
| 237 #if defined(OS_WIN) | 234 #if defined(OS_WIN) |
| 238 scoped_refptr<MozillaExtensionApi> mozilla_extenstions_; | 235 scoped_refptr<MozillaExtensionApi> mozilla_extenstions_; |
| 239 #endif | 236 #endif |
| (...skipping 15 matching lines...) Expand all Loading... |
| 255 // List of files created for the current plugin instance. File names are | 252 // List of files created for the current plugin instance. File names are |
| 256 // added to the list every time the NPP_StreamAsFile function is called. | 253 // added to the list every time the NPP_StreamAsFile function is called. |
| 257 std::vector<FilePath> files_created_; | 254 std::vector<FilePath> files_created_; |
| 258 | 255 |
| 259 DISALLOW_EVIL_CONSTRUCTORS(PluginInstance); | 256 DISALLOW_EVIL_CONSTRUCTORS(PluginInstance); |
| 260 }; | 257 }; |
| 261 | 258 |
| 262 } // namespace NPAPI | 259 } // namespace NPAPI |
| 263 | 260 |
| 264 #endif // WEBKIT_GLUE_PLUGIN_PLUGIN_INSTANCE_H__ | 261 #endif // WEBKIT_GLUE_PLUGIN_PLUGIN_INSTANCE_H__ |
| OLD | NEW |