Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: third_party/libjingle/overrides/talk/base/messagequeue.h

Issue 9455070: Remove the dependency to ws2_32.dll from talk_base::ThreadManager and talk_base::Thread. (Closed) Base URL: https://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2004--2005, Google Inc. 3 * Copyright 2004--2005, Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 } 164 }
165 165
166 int cmsDelay_; // for debugging 166 int cmsDelay_; // for debugging
167 uint32 msTrigger_; 167 uint32 msTrigger_;
168 uint32 num_; 168 uint32 num_;
169 Message msg_; 169 Message msg_;
170 }; 170 };
171 171
172 class MessageQueue { 172 class MessageQueue {
173 public: 173 public:
174 explicit MessageQueue(SocketServer* ss = NULL); 174 // A phiscal socket server will be created for this ctor.
175 MessageQueue();
176 // If |ss| is NULL, a dummy socket server will be created.
177 explicit MessageQueue(SocketServer* ss);
175 virtual ~MessageQueue(); 178 virtual ~MessageQueue();
176 179
180 void Construct();
181
177 SocketServer* socketserver() { return ss_; } 182 SocketServer* socketserver() { return ss_; }
178 void set_socketserver(SocketServer* ss); 183 void set_socketserver(SocketServer* ss);
179 184
180 // Note: The behavior of MessageQueue has changed. When a MQ is stopped, 185 // Note: The behavior of MessageQueue has changed. When a MQ is stopped,
181 // futher Posts and Sends will fail. However, any pending Sends and *ready* 186 // futher Posts and Sends will fail. However, any pending Sends and *ready*
182 // Posts (as opposed to unexpired delayed Posts) will be delivered before 187 // Posts (as opposed to unexpired delayed Posts) will be delivered before
183 // Get (or Peek) returns false. By guaranteeing delivery of those messages, 188 // Get (or Peek) returns false. By guaranteeing delivery of those messages,
184 // we eliminate the race condition when an MessageHandler and MessageQueue 189 // we eliminate the race condition when an MessageHandler and MessageQueue
185 // may be destroyed independently of each other. 190 // may be destroyed independently of each other.
186 virtual void Quit(); 191 virtual void Quit();
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 uint32 dmsgq_next_num_; 257 uint32 dmsgq_next_num_;
253 CriticalSection crit_; 258 CriticalSection crit_;
254 259
255 private: 260 private:
256 DISALLOW_COPY_AND_ASSIGN(MessageQueue); 261 DISALLOW_COPY_AND_ASSIGN(MessageQueue);
257 }; 262 };
258 263
259 } // namespace talk_base 264 } // namespace talk_base
260 265
261 #endif // TALK_BASE_MESSAGEQUEUE_H_ 266 #endif // TALK_BASE_MESSAGEQUEUE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698