OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/message_pump_libevent.h" | 5 #include "base/message_pump_libevent.h" |
6 | 6 |
7 #include <unistd.h> | 7 #include <unistd.h> |
8 | 8 |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/threading/thread.h" | 10 #include "base/threading/thread.h" |
11 #include "build/build_config.h" | |
12 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
13 | 12 |
14 #if defined(USE_SYSTEM_LIBEVENT) | 13 #if defined(USE_SYSTEM_LIBEVENT) |
15 #include <event.h> | 14 #include <event.h> |
16 #else | 15 #else |
17 #include "third_party/libevent/event.h" | 16 #include "third_party/libevent/event.h" |
18 #endif | 17 #endif |
19 | 18 |
20 namespace base { | 19 namespace base { |
21 | 20 |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 pump->WatchFileDescriptor( | 136 pump->WatchFileDescriptor( |
138 0, false, MessagePumpLibevent::WATCH_READ_WRITE, &watcher, &delegate); | 137 0, false, MessagePumpLibevent::WATCH_READ_WRITE, &watcher, &delegate); |
139 | 138 |
140 // Spoof a libevent notification. | 139 // Spoof a libevent notification. |
141 OnLibeventNotification(pump, &watcher); | 140 OnLibeventNotification(pump, &watcher); |
142 } | 141 } |
143 | 142 |
144 } // namespace | 143 } // namespace |
145 | 144 |
146 } // namespace base | 145 } // namespace base |
OLD | NEW |