| 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 THIRD_PARTY_MOJO_SRC_MOJO_EDK_EMBEDDER_PLATFORM_HANDLE_VECTOR_H_ | 5 #ifndef MOJO_EDK_EMBEDDER_PLATFORM_HANDLE_VECTOR_H_ |
| 6 #define THIRD_PARTY_MOJO_SRC_MOJO_EDK_EMBEDDER_PLATFORM_HANDLE_VECTOR_H_ | 6 #define MOJO_EDK_EMBEDDER_PLATFORM_HANDLE_VECTOR_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "third_party/mojo/src/mojo/edk/embedder/platform_handle.h" | 11 #include "mojo/edk/embedder/platform_handle.h" |
| 12 #include "third_party/mojo/src/mojo/edk/embedder/platform_handle_utils.h" | 12 #include "mojo/edk/embedder/platform_handle_utils.h" |
| 13 #include "third_party/mojo/src/mojo/edk/system/system_impl_export.h" | 13 #include "mojo/edk/system/system_impl_export.h" |
| 14 | 14 |
| 15 namespace mojo { | 15 namespace mojo { |
| 16 namespace embedder { | 16 namespace edk { |
| 17 | 17 |
| 18 using PlatformHandleVector = std::vector<PlatformHandle>; | 18 using PlatformHandleVector = std::vector<PlatformHandle>; |
| 19 | 19 |
| 20 // A deleter (for use with |scoped_ptr|) which closes all handles and then | 20 // A deleter (for use with |scoped_ptr|) which closes all handles and then |
| 21 // |delete|s the |PlatformHandleVector|. | 21 // |delete|s the |PlatformHandleVector|. |
| 22 struct MOJO_SYSTEM_IMPL_EXPORT PlatformHandleVectorDeleter { | 22 struct MOJO_SYSTEM_IMPL_EXPORT PlatformHandleVectorDeleter { |
| 23 void operator()(PlatformHandleVector* platform_handles) const { | 23 void operator()(PlatformHandleVector* platform_handles) const { |
| 24 CloseAllPlatformHandles(platform_handles); | 24 CloseAllPlatformHandles(platform_handles); |
| 25 delete platform_handles; | 25 delete platform_handles; |
| 26 } | 26 } |
| 27 }; | 27 }; |
| 28 | 28 |
| 29 using ScopedPlatformHandleVectorPtr = | 29 using ScopedPlatformHandleVectorPtr = |
| 30 scoped_ptr<PlatformHandleVector, PlatformHandleVectorDeleter>; | 30 scoped_ptr<PlatformHandleVector, PlatformHandleVectorDeleter>; |
| 31 | 31 |
| 32 } // namespace embedder | 32 } // namespace edk |
| 33 } // namespace mojo | 33 } // namespace mojo |
| 34 | 34 |
| 35 #endif // THIRD_PARTY_MOJO_SRC_MOJO_EDK_EMBEDDER_PLATFORM_HANDLE_VECTOR_H_ | 35 #endif // MOJO_EDK_EMBEDDER_PLATFORM_HANDLE_VECTOR_H_ |
| OLD | NEW |