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/IcedTeaPluginRequestProcessor.h

    r348 r429  
    4747
    4848#include <npapi.h>
    49 
    50 #if MOZILLA_VERSION_COLLAPSED < 1090100
    51 #include <npupp.h>
    52 #else
    53 #include <npapi.h>
    5449#include <npruntime.h>
    55 #endif
    5650
    5751#include "IcedTeaPluginUtils.h"
     
    7670void* queue_processor(void* data);
    7771
    78 /* Mutex to ensure that the request queue is accessed synchronously */
    79 extern pthread_mutex_t message_queue_mutex;
    80 
    81 /* Mutex to ensure synchronized writes */
    82 extern pthread_mutex_t syn_write_mutex;
    83 
    84 /* Queue for holding messages that get processed in a separate thread */
    85 extern std::vector< std::vector<std::string*>* >* message_queue;
    86 
    8772/**
    8873 * Processes requests made TO the plugin (by java or anyone else)
     
    9277    private:
    9378
    94         /* Requests that are still pending */
    95         std::map<pthread_t, uintmax_t>* pendingRequests;
     79        /* Mutex to ensure that the request queue is accessed synchronously */
     80        pthread_mutex_t message_queue_mutex;
     81
     82        /* Condition on which the queue processor waits */
     83        pthread_cond_t cond_message_available;
     84
     85        /* Queue for holding messages that get processed in a separate thread */
     86        std::vector< std::vector<std::string*>* >* message_queue;
     87
     88        /* Mutex to ensure synchronized writes */
     89        pthread_mutex_t syn_write_mutex;
    9690
    9791        /* Dispatch request processing to a new thread for asynch. processing */
     
    10397        /* Stores the variant on java side */
    10498        void storeVariantInJava(NPVariant variant, std::string* result);
    105 
    106     public:
    107         PluginRequestProcessor(); /* Constructor */
    108         ~PluginRequestProcessor(); /* Destructor */
    109 
    110         /* Process new requests (if applicable) */
    111         virtual bool newMessageOnBus(const char* message);
    11299
    113100        /* Send member ID to Java */
     
    131118        /* Loads a URL into the specified target */
    132119        void loadURL(std::vector<std::string*>* message_parts);
     120
     121    public:
     122        PluginRequestProcessor(); /* Constructor */
     123        ~PluginRequestProcessor(); /* Destructor */
     124
     125        /* Process new requests (if applicable) */
     126        virtual bool newMessageOnBus(const char* message);
     127
     128        /* Thread run method for processing queued messages */
     129        void queueProcessorThread();
    133130};
    134131
Note: See TracChangeset for help on using the changeset viewer.