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

Side by Side Diff: base/message_pump_libevent.h

Issue 3202: Make tcp_client_socket_unittest pass on Linux.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « base/message_loop.cc ('k') | base/message_pump_libevent.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef BASE_MESSAGE_PUMP_LIBEVENT_H_
6 #define BASE_MESSAGE_PUMP_LIBEVENT_H_
7
8 #include "base/message_pump.h"
9 #include "base/time.h"
10
11 // from libevent
12 struct event_base;
13 struct event;
14
15 namespace base {
16
17 class MessagePumpLibevent : public MessagePump {
18 public:
19 MessagePumpLibevent();
20 virtual ~MessagePumpLibevent();
21
22 // MessagePump methods:
23 virtual void Run(Delegate* delegate);
24 virtual void Quit();
25 virtual void ScheduleWork();
26 virtual void ScheduleDelayedWork(const Time& delayed_work_time);
27
28 struct event_base* getEventbase() { return evbase_; }
29
30 private:
31 // This flag is set to false when Run should return.
32 bool keep_running_;
33
34 // The time at which we should call DoDelayedWork.
35 Time delayed_work_time_;
36
37 // Wakeup pipe to let other threads break us out of libevent loop.
38 int wakeup_pipe_gazinta_;
39 // need to fix friendship.
40 public:
41 int wakeup_pipe_gazouta_;
42
43 // Libevent dispatcher
44 ::event_base *evbase_;
45 private:
46 struct event *wakeup_event_;
47
48 DISALLOW_COPY_AND_ASSIGN(MessagePumpLibevent);
49 };
50
51 } // namespace base
52
53 #endif // BASE_MESSAGE_PUMP_LIBEVENT_H_
54
OLDNEW
« no previous file with comments | « base/message_loop.cc ('k') | base/message_pump_libevent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698