Changeset 429 for trunk/icedtea-web/plugin/icedteanp/IcedTeaNPPlugin.h
- Timestamp:
- Sep 24, 2014, 9:34:21 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/icedtea-web/plugin/icedteanp/IcedTeaNPPlugin.h
r369 r429 40 40 #define __ICEDTEANPPLUGIN_H__ 41 41 42 #if MOZILLA_VERSION_COLLAPSED < 109010043 #include <nsThreadUtils.h>44 #else45 42 #include <npapi.h> 46 43 #include <npruntime.h> 47 44 #include <npfunctions.h> 48 #endif49 45 50 46 // GLib includes. 51 47 #include <glib.h> 52 48 #include <glib/gstdio.h> 53 54 #ifndef __OS2__55 // GTK includes.56 #include <gtk/gtk.h>57 #endif58 49 59 50 #include "IcedTeaPluginUtils.h" … … 69 60 // A unique identifier for this plugin window. 70 61 gchar* instance_id; 71 // The applet tag sent to Java side72 gchar* applet_tag;62 // The parameter list string sent to Java side 63 gchar* parameters_string; 73 64 // Mutex to protect appletviewer_alive. 74 65 GMutex* appletviewer_mutex; … … 84 75 guint32 window_height; 85 76 // The source location for this instance 86 gchar*source;77 std::string source; 87 78 // If this is an actual applet instance, or a dummy instance for static calls 88 79 bool is_applet_instance; 80 81 ITNPPluginData() { 82 instance_id = NULL; 83 parameters_string = NULL; 84 appletviewer_mutex = NULL; 85 owner = (NPP)NULL; 86 window_handle = NULL; 87 window_width = 0; 88 window_height = 0; 89 is_applet_instance = false; 90 } 91 ~ITNPPluginData() { 92 if (appletviewer_mutex) { 93 g_mutex_free (appletviewer_mutex); 94 } 95 // cleanup_instance_string: 96 g_free (instance_id); 97 // cleanup applet tag 98 g_free (parameters_string); 99 } 89 100 }; 90 101 91 // Queue processing threads 92 static pthread_t plugin_request_processor_thread1; 93 static pthread_t plugin_request_processor_thread2; 94 static pthread_t plugin_request_processor_thread3; 102 // Have the browser allocate a new ITNPPluginData structure. 103 ITNPPluginData* plugin_data_new (); 104 void plugin_data_destroy (NPP instance); 95 105 96 #ifdef __OS2__ 97 struct QueueProcessorData 98 { 99 PluginRequestProcessor *processor; 100 bool stopRequested; 101 }; 102 103 static QueueProcessorData queue_processor_data1 = { NULL, false }; 104 static QueueProcessorData queue_processor_data2 = { NULL, false }; 105 static QueueProcessorData queue_processor_data3 = { NULL, false }; 106 #endif 107 108 // Condition on which the queue processor waits 109 extern pthread_cond_t cond_message_available; 106 NPError initialize_data_directory(); 107 NPError start_jvm_if_needed(); 110 108 111 109 // ID of plug-in thread … … 115 113 extern pthread_mutex_t pluginAsyncCallMutex; 116 114 117 // debug switch 115 /*to sync pipe to apletviewer console*/ 116 extern pthread_mutex_t debug_pipe_lock; 117 118 // debug switches 119 extern bool debug_initiated; 118 120 extern int plugin_debug; 121 extern bool plugin_debug_headers; 122 extern bool plugin_debug_to_file; 123 extern bool plugin_debug_to_streams; 124 extern bool plugin_debug_to_system; 125 extern bool plugin_debug_to_console; 126 extern FILE * plugin_file_log; 127 extern std::string plugin_file_log_name; 128 extern gchar* debug_pipe_name; 129 130 extern gboolean jvm_up; 119 131 120 132 // Browser function table. … … 144 156 /* Sends a message to the appletviewer */ 145 157 void plugin_send_message_to_appletviewer(gchar const* message); 158 /*this method is not logging, do not add \n and is using different pipe*/ 159 void plugin_send_message_to_appletviewer_console(gchar const* message); 160 void flush_plugin_send_message_to_appletviewer_console(); 146 161 147 162 /* Returns an appropriate (package/object) scriptable npobject */ … … 151 166 NPObject* allocate_scriptable_object(NPP npp, NPClass *aClass); 152 167 168 NPError plugin_start_appletviewer (ITNPPluginData* data); 169 153 170 #endif /* __ICEDTEANPPLUGIN_H__ */
Note:
See TracChangeset
for help on using the changeset viewer.