Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / mojo / embedder / platform_handle_vector.h
blobdb5341962332570a529316c26b862b8d260a5d81
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
3 // found in the LICENSE file.
5 #ifndef MOJO_EMBEDDER_PLATFORM_HANDLE_VECTOR_H_
6 #define MOJO_EMBEDDER_PLATFORM_HANDLE_VECTOR_H_
8 #include <vector>
10 #include "base/memory/scoped_ptr.h"
11 #include "mojo/embedder/platform_handle.h"
12 #include "mojo/embedder/platform_handle_utils.h"
13 #include "mojo/system/system_impl_export.h"
15 namespace mojo {
16 namespace embedder {
18 typedef std::vector<PlatformHandle> PlatformHandleVector;
20 // A deleter (for use with |scoped_ptr|) which closes all handles and then
21 // |delete|s the |PlatformHandleVector|.
22 struct MOJO_SYSTEM_IMPL_EXPORT PlatformHandleVectorDeleter {
23 void operator()(PlatformHandleVector* platform_handles) const {
24 CloseAllPlatformHandles(platform_handles);
25 delete platform_handles;
29 typedef scoped_ptr<PlatformHandleVector, PlatformHandleVectorDeleter>
30 ScopedPlatformHandleVectorPtr;
32 } // namespace embedder
33 } // namespace mojo
35 #endif // MOJO_EMBEDDER_PLATFORM_HANDLE_VECTOR_H_