Ignore:
Timestamp:
Sep 24, 2014, 9:34:21 PM (11 years ago)
Author:
dmik
Message:

icedtea-web: Merge version 1.5.1 from vendor to trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/icedtea-web/plugin/icedteanp/IcedTeaNPPlugin.h

    r369 r429  
    4040#define __ICEDTEANPPLUGIN_H__
    4141
    42 #if MOZILLA_VERSION_COLLAPSED < 1090100
    43 #include <nsThreadUtils.h>
    44 #else
    4542#include <npapi.h>
    4643#include <npruntime.h>
    4744#include <npfunctions.h>
    48 #endif
    4945
    5046// GLib includes.
    5147#include <glib.h>
    5248#include <glib/gstdio.h>
    53 
    54 #ifndef __OS2__
    55 // GTK includes.
    56 #include <gtk/gtk.h>
    57 #endif
    5849
    5950#include "IcedTeaPluginUtils.h"
     
    6960  // A unique identifier for this plugin window.
    7061  gchar* instance_id;
    71   // The applet tag sent to Java side
    72   gchar* applet_tag;
     62  // The parameter list string sent to Java side
     63  gchar* parameters_string;
    7364  // Mutex to protect appletviewer_alive.
    7465  GMutex* appletviewer_mutex;
     
    8475  guint32 window_height;
    8576  // The source location for this instance
    86   gchar* source;
     77  std::string source;
    8778  // If this is an actual applet instance, or a dummy instance for static calls
    8879  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  }
    89100};
    90101
    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.
     103ITNPPluginData* plugin_data_new ();
     104void plugin_data_destroy (NPP instance);
    95105
    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;
     106NPError initialize_data_directory();
     107NPError start_jvm_if_needed();
    110108
    111109// ID of plug-in thread
     
    115113extern pthread_mutex_t pluginAsyncCallMutex;
    116114
    117 // debug switch
     115/*to sync pipe to apletviewer console*/
     116extern pthread_mutex_t debug_pipe_lock;
     117
     118// debug switches
     119extern bool debug_initiated;
    118120extern int plugin_debug;
     121extern bool plugin_debug_headers;
     122extern bool plugin_debug_to_file;
     123extern bool plugin_debug_to_streams;
     124extern bool plugin_debug_to_system;
     125extern bool plugin_debug_to_console;
     126extern FILE * plugin_file_log;
     127extern std::string plugin_file_log_name;
     128extern gchar* debug_pipe_name;
     129
     130extern gboolean jvm_up;
    119131
    120132// Browser function table.
     
    144156/* Sends a message to the appletviewer */
    145157void plugin_send_message_to_appletviewer(gchar const* message);
     158/*this method is not logging, do not add \n and is using different pipe*/
     159void plugin_send_message_to_appletviewer_console(gchar const* message);
     160void flush_plugin_send_message_to_appletviewer_console();
    146161
    147162/* Returns an appropriate (package/object) scriptable npobject */
     
    151166NPObject* allocate_scriptable_object(NPP npp, NPClass *aClass);
    152167
     168NPError plugin_start_appletviewer (ITNPPluginData* data);
     169
    153170#endif  /* __ICEDTEANPPLUGIN_H__ */
Note: See TracChangeset for help on using the changeset viewer.