• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2018 The Chromium Authors
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_LOOP_MESSAGE_PUMP_FOR_IO_H_
6 #define BASE_MESSAGE_LOOP_MESSAGE_PUMP_FOR_IO_H_
7 
8 // This header is a forwarding header to coalesce the various platform specific
9 // types representing MessagePumpForIO.
10 
11 #include "base/message_loop/ios_cronet_buildflags.h"
12 #include "build/build_config.h"
13 
14 #if BUILDFLAG(IS_WIN)
15 #include "base/message_loop/message_pump_win.h"
16 #elif BUILDFLAG(IS_IOS) && BUILDFLAG(CRONET_BUILD)
17 #include "base/message_loop/message_pump_io_ios.h"
18 #elif BUILDFLAG(IS_APPLE)
19 #include "base/message_loop/message_pump_kqueue.h"
20 #elif BUILDFLAG(IS_NACL)
21 #include "base/message_loop/message_pump_default.h"
22 #elif BUILDFLAG(IS_FUCHSIA)
23 #include "base/message_loop/message_pump_fuchsia.h"
24 #elif BUILDFLAG(IS_POSIX)
25 #include "base/message_loop/message_pump_epoll.h"
26 #endif
27 
28 namespace base {
29 
30 #if BUILDFLAG(IS_WIN)
31 // Windows defines it as-is.
32 using MessagePumpForIO = MessagePumpForIO;
33 #elif BUILDFLAG(IS_IOS) && BUILDFLAG(CRONET_BUILD)
34 using MessagePumpForIO = MessagePumpIOSForIO;
35 #elif BUILDFLAG(IS_APPLE)
36 using MessagePumpForIO = MessagePumpKqueue;
37 #elif BUILDFLAG(IS_NACL)
38 using MessagePumpForIO = MessagePumpDefault;
39 #elif BUILDFLAG(IS_FUCHSIA)
40 using MessagePumpForIO = MessagePumpFuchsia;
41 #elif BUILDFLAG(IS_POSIX)
42 using MessagePumpForIO = MessagePumpEpoll;
43 #else
44 #error Platform does not define MessagePumpForIO
45 #endif
46 
47 }  // namespace base
48 
49 #endif  // BASE_MESSAGE_LOOP_MESSAGE_PUMP_FOR_IO_H_
50