Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(450)

Side by Side Diff: mojo/edk/embedder/platform_handle_vector.h

Issue 1346383004: EDK: Remove MOJO_SYSTEM_IMPL_EXPORT, system_impl_export.h, etc. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mojo/edk/embedder/platform_handle_utils.h ('k') | mojo/edk/embedder/platform_shared_buffer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_EMBEDDER_PLATFORM_HANDLE_VECTOR_H_ 5 #ifndef MOJO_EDK_EMBEDDER_PLATFORM_HANDLE_VECTOR_H_
6 #define MOJO_EDK_EMBEDDER_PLATFORM_HANDLE_VECTOR_H_ 6 #define MOJO_EDK_EMBEDDER_PLATFORM_HANDLE_VECTOR_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
11 #include "mojo/edk/embedder/platform_handle.h" 11 #include "mojo/edk/embedder/platform_handle.h"
12 #include "mojo/edk/embedder/platform_handle_utils.h" 12 #include "mojo/edk/embedder/platform_handle_utils.h"
13 #include "mojo/edk/system/system_impl_export.h"
14 13
15 namespace mojo { 14 namespace mojo {
16 namespace embedder { 15 namespace embedder {
17 16
18 // TODO(vtl): Can we switch to using std::vector<ScopedPlatformHandle> instead? 17 // TODO(vtl): Can we switch to using std::vector<ScopedPlatformHandle> instead?
19 using PlatformHandleVector = std::vector<PlatformHandle>; 18 using PlatformHandleVector = std::vector<PlatformHandle>;
20 19
21 // A deleter (for use with |std::unique_ptr|) that closes all handles and then 20 // A deleter (for use with |std::unique_ptr|) that closes all handles and then
22 // |delete|s the |PlatformHandleVector|. 21 // |delete|s the |PlatformHandleVector|.
23 struct MOJO_SYSTEM_IMPL_EXPORT PlatformHandleVectorDeleter { 22 struct PlatformHandleVectorDeleter {
24 void operator()(PlatformHandleVector* platform_handles) const { 23 void operator()(PlatformHandleVector* platform_handles) const {
25 CloseAllPlatformHandles(platform_handles); 24 CloseAllPlatformHandles(platform_handles);
26 delete platform_handles; 25 delete platform_handles;
27 } 26 }
28 }; 27 };
29 28
30 using ScopedPlatformHandleVectorPtr = 29 using ScopedPlatformHandleVectorPtr =
31 std::unique_ptr<PlatformHandleVector, PlatformHandleVectorDeleter>; 30 std::unique_ptr<PlatformHandleVector, PlatformHandleVectorDeleter>;
32 31
33 } // namespace embedder 32 } // namespace embedder
34 } // namespace mojo 33 } // namespace mojo
35 34
36 #endif // MOJO_EDK_EMBEDDER_PLATFORM_HANDLE_VECTOR_H_ 35 #endif // MOJO_EDK_EMBEDDER_PLATFORM_HANDLE_VECTOR_H_
OLDNEW
« no previous file with comments | « mojo/edk/embedder/platform_handle_utils.h ('k') | mojo/edk/embedder/platform_shared_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698