OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 MOJO_EDK_PLATFORM_SCOPED_PLATFORM_HANDLE_H_ | 5 #ifndef MOJO_EDK_PLATFORM_SCOPED_PLATFORM_HANDLE_H_ |
6 #define MOJO_EDK_PLATFORM_SCOPED_PLATFORM_HANDLE_H_ | 6 #define MOJO_EDK_PLATFORM_SCOPED_PLATFORM_HANDLE_H_ |
7 | 7 |
| 8 #include <mojo/macros.h> |
| 9 |
8 #include "mojo/edk/platform/platform_handle.h" | 10 #include "mojo/edk/platform/platform_handle.h" |
9 #include "mojo/public/c/system/macros.h" | |
10 #include "mojo/public/cpp/system/macros.h" | 11 #include "mojo/public/cpp/system/macros.h" |
11 | 12 |
12 namespace mojo { | 13 namespace mojo { |
13 namespace platform { | 14 namespace platform { |
14 | 15 |
15 // Scoper for |PlatformHandle|s, which are just file descriptors. | 16 // Scoper for |PlatformHandle|s, which are just file descriptors. |
16 class ScopedPlatformHandle { | 17 class ScopedPlatformHandle { |
17 public: | 18 public: |
18 ScopedPlatformHandle() {} | 19 ScopedPlatformHandle() {} |
19 explicit ScopedPlatformHandle(PlatformHandle handle) : handle_(handle) {} | 20 explicit ScopedPlatformHandle(PlatformHandle handle) : handle_(handle) {} |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 private: | 57 private: |
57 PlatformHandle handle_; | 58 PlatformHandle handle_; |
58 | 59 |
59 MOJO_MOVE_ONLY_TYPE(ScopedPlatformHandle); | 60 MOJO_MOVE_ONLY_TYPE(ScopedPlatformHandle); |
60 }; | 61 }; |
61 | 62 |
62 } // namespace platform | 63 } // namespace platform |
63 } // namespace mojo | 64 } // namespace mojo |
64 | 65 |
65 #endif // MOJO_EDK_PLATFORM_SCOPED_PLATFORM_HANDLE_H_ | 66 #endif // MOJO_EDK_PLATFORM_SCOPED_PLATFORM_HANDLE_H_ |
OLD | NEW |