OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef IPC_ATTACHMENT_BROKER_H_ | 5 #ifndef IPC_ATTACHMENT_BROKER_H_ |
6 #define IPC_ATTACHMENT_BROKER_H_ | 6 #define IPC_ATTACHMENT_BROKER_H_ |
7 | 7 |
8 #include "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/process/process_handle.h" | 11 #include "base/process/process_handle.h" |
12 #include "base/synchronization/lock.h" | 12 #include "base/synchronization/lock.h" |
| 13 #include "build/build_config.h" |
13 #include "ipc/brokerable_attachment.h" | 14 #include "ipc/brokerable_attachment.h" |
14 #include "ipc/ipc_export.h" | 15 #include "ipc/ipc_export.h" |
15 #include "ipc/ipc_listener.h" | 16 #include "ipc/ipc_listener.h" |
16 | 17 |
17 // If the platform has no attachments that need brokering, then it shouldn't | 18 // If the platform has no attachments that need brokering, then it shouldn't |
18 // compile any code that calls member functions of AttachmentBroker. This | 19 // compile any code that calls member functions of AttachmentBroker. This |
19 // prevents symbols only used by AttachmentBroker and its subclasses from | 20 // prevents symbols only used by AttachmentBroker and its subclasses from |
20 // making it into the binary. | 21 // making it into the binary. |
21 #if defined(OS_WIN) || (defined(OS_MACOSX) && !defined(OS_IOS)) | 22 #if defined(OS_WIN) || (defined(OS_MACOSX) && !defined(OS_IOS)) |
22 #define USE_ATTACHMENT_BROKER 1 | 23 #define USE_ATTACHMENT_BROKER 1 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 149 |
149 // The AttachmentBroker can be accessed from any thread, so modifications to | 150 // The AttachmentBroker can be accessed from any thread, so modifications to |
150 // internal state must be guarded by a lock. | 151 // internal state must be guarded by a lock. |
151 base::Lock lock_; | 152 base::Lock lock_; |
152 DISALLOW_COPY_AND_ASSIGN(AttachmentBroker); | 153 DISALLOW_COPY_AND_ASSIGN(AttachmentBroker); |
153 }; | 154 }; |
154 | 155 |
155 } // namespace IPC | 156 } // namespace IPC |
156 | 157 |
157 #endif // IPC_ATTACHMENT_BROKER_H_ | 158 #endif // IPC_ATTACHMENT_BROKER_H_ |
OLD | NEW |