OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef MOJO_EMBEDDER_PLATFORM_HANDLE_UTILS_H_ |
| 6 #define MOJO_EMBEDDER_PLATFORM_HANDLE_UTILS_H_ |
| 7 |
| 8 #include "mojo/embedder/platform_handle.h" |
| 9 #include "mojo/system/system_impl_export.h" |
| 10 |
| 11 namespace mojo { |
| 12 namespace embedder { |
| 13 |
| 14 template <typename PlatformHandleContainer> |
| 15 MOJO_SYSTEM_IMPL_EXPORT inline void CloseAllPlatformHandles( |
| 16 PlatformHandleContainer* platform_handles) { |
| 17 for (typename PlatformHandleContainer::iterator it = |
| 18 platform_handles->begin(); |
| 19 it != platform_handles->end(); |
| 20 ++it) |
| 21 it->CloseIfNecessary(); |
| 22 } |
| 23 |
| 24 } // namespace embedder |
| 25 } // namespace mojo |
| 26 |
| 27 #endif // MOJO_EMBEDDER_PLATFORM_HANDLE_UTILS_H_ |
OLD | NEW |