mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
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.
39 lines
1.4 KiB
C++
39 lines
1.4 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_SIMPLE_PLATFORM_SUPPORT_H_
|
|
#define MOJO_EDK_EMBEDDER_SIMPLE_PLATFORM_SUPPORT_H_
|
|
|
|
#include "mojo/edk/embedder/platform_support.h"
|
|
#include "mojo/public/cpp/system/macros.h"
|
|
|
|
namespace mojo {
|
|
namespace embedder {
|
|
|
|
// A simple implementation of |PlatformSupport|, when sandboxing and
|
|
// multiprocess support are not issues (e.g., in most tests). Note: This class
|
|
// has no state, and different instances of |SimplePlatformSupport| are mutually
|
|
// compatible (i.e., you don't need to use a single instance of it everywhere --
|
|
// you may simply create one whenever/wherever you need it).
|
|
class SimplePlatformSupport final : public PlatformSupport {
|
|
public:
|
|
SimplePlatformSupport() {}
|
|
~SimplePlatformSupport() override {}
|
|
|
|
MojoTimeTicks GetTimeTicksNow() override;
|
|
void GetCryptoRandomBytes(void* bytes, size_t num_bytes) override;
|
|
PlatformSharedBuffer* CreateSharedBuffer(size_t num_bytes) override;
|
|
PlatformSharedBuffer* CreateSharedBufferFromHandle(
|
|
size_t num_bytes,
|
|
ScopedPlatformHandle platform_handle) override;
|
|
|
|
private:
|
|
MOJO_DISALLOW_COPY_AND_ASSIGN(SimplePlatformSupport);
|
|
};
|
|
|
|
} // namespace embedder
|
|
} // namespace mojo
|
|
|
|
#endif // MOJO_EDK_EMBEDDER_SIMPLE_PLATFORM_SUPPORT_H_
|