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

Side by Side Diff: third_party/libjingle/overrides/talk/base/thread.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 Google Inc. 3 * Copyright 2004 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 protected: 110 protected:
111 Runnable() {} 111 Runnable() {}
112 112
113 private: 113 private:
114 DISALLOW_COPY_AND_ASSIGN(Runnable); 114 DISALLOW_COPY_AND_ASSIGN(Runnable);
115 }; 115 };
116 116
117 class Thread : public MessageQueue { 117 class Thread : public MessageQueue {
118 public: 118 public:
119 Thread(SocketServer* ss = NULL); 119 Thread();
120 explicit Thread(SocketServer* ss);
120 virtual ~Thread(); 121 virtual ~Thread();
121 122
123 void Construct();
124
122 static inline Thread* Current() { 125 static inline Thread* Current() {
123 return ThreadManager::Instance()->CurrentThread(); 126 return ThreadManager::Instance()->CurrentThread();
124 } 127 }
125 128
126 bool IsCurrent() const { 129 bool IsCurrent() const {
127 return ThreadManager::Instance()->CurrentThread() == this; 130 return ThreadManager::Instance()->CurrentThread() == this;
128 } 131 }
129 132
130 // Sleeps the calling thread for the specified number of milliseconds, during 133 // Sleeps the calling thread for the specified number of milliseconds, during
131 // which time no processing is performed. Returns false if sleeping was 134 // which time no processing is performed. Returns false if sleeping was
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 279
277 private: 280 private:
278 SocketServer* old_ss_; 281 SocketServer* old_ss_;
279 282
280 DISALLOW_IMPLICIT_CONSTRUCTORS(SocketServerScope); 283 DISALLOW_IMPLICIT_CONSTRUCTORS(SocketServerScope);
281 }; 284 };
282 285
283 } // namespace talk_base 286 } // namespace talk_base
284 287
285 #endif // TALK_BASE_THREAD_H_ 288 #endif // TALK_BASE_THREAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698