- Timestamp:
- Sep 24, 2014, 9:34:21 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/icedtea-web/plugin/icedteanp/IcedTeaPluginRequestProcessor.h
r348 r429 47 47 48 48 #include <npapi.h> 49 50 #if MOZILLA_VERSION_COLLAPSED < 109010051 #include <npupp.h>52 #else53 #include <npapi.h>54 49 #include <npruntime.h> 55 #endif56 50 57 51 #include "IcedTeaPluginUtils.h" … … 76 70 void* queue_processor(void* data); 77 71 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 87 72 /** 88 73 * Processes requests made TO the plugin (by java or anyone else) … … 92 77 private: 93 78 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; 96 90 97 91 /* Dispatch request processing to a new thread for asynch. processing */ … … 103 97 /* Stores the variant on java side */ 104 98 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);112 99 113 100 /* Send member ID to Java */ … … 131 118 /* Loads a URL into the specified target */ 132 119 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(); 133 130 }; 134 131
Note:
See TracChangeset
for help on using the changeset viewer.