flutter_flutter/mojo/edk/embedder/platform_handle_vector.h
James Robinson 5bb2480bcd Update to Mojo 4e4d51ce28a8edcb32b9c7f555e38e2ae84a825e, update deps
This updates to mojo 4e4d51ce28a and mojo sdk 711a0bcfb141b4 and updates the sky
package's pubspec.yaml dependency to '>=0.1.0 <0.2.0' to be compatible with
the current mojo package. This includes an update to the Mojo Dart generator to
produce real classes for enums and the corresponding updates for users of the
KeyboardType enum in Sky as well as one scoped_ptr->std::unique_ptr in shell
corresponding to a change in the Mojo EDK.

When a new version of the sky and sky_services package are pushed this will fix
domokit/mojo#440.
2015-09-23 17:26:46 -07:00

36 lines
1.1 KiB
C++

// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MOJO_EDK_EMBEDDER_PLATFORM_HANDLE_VECTOR_H_
#define MOJO_EDK_EMBEDDER_PLATFORM_HANDLE_VECTOR_H_
#include <memory>
#include <vector>
#include "mojo/edk/embedder/platform_handle.h"
#include "mojo/edk/embedder/platform_handle_utils.h"
namespace mojo {
namespace embedder {
// TODO(vtl): Can we switch to using std::vector<ScopedPlatformHandle> instead?
using PlatformHandleVector = std::vector<PlatformHandle>;
// A deleter (for use with |std::unique_ptr|) that closes all handles and then
// |delete|s the |PlatformHandleVector|.
struct PlatformHandleVectorDeleter {
void operator()(PlatformHandleVector* platform_handles) const {
CloseAllPlatformHandles(platform_handles);
delete platform_handles;
}
};
using ScopedPlatformHandleVectorPtr =
std::unique_ptr<PlatformHandleVector, PlatformHandleVectorDeleter>;
} // namespace embedder
} // namespace mojo
#endif // MOJO_EDK_EMBEDDER_PLATFORM_HANDLE_VECTOR_H_