| Index: content/shell/utility/mojo_test_impl.cc
|
| diff --git a/content/shell/utility/mojo_test_impl.cc b/content/shell/utility/mojo_test_impl.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e4a27475e671767cf4215440eb24a56f50d2f7e5
|
| --- /dev/null
|
| +++ b/content/shell/utility/mojo_test_impl.cc
|
| @@ -0,0 +1,33 @@
|
| +// Copyright 2016 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.
|
| +
|
| +#include "content/shell/utility/mojo_test_impl.h"
|
| +
|
| +#include <utility>
|
| +
|
| +#include "mojo/public/cpp/system/buffer.h"
|
| +
|
| +namespace content {
|
| +
|
| +// static
|
| +void MojoTestImpl::CreateMojoTestImpl(
|
| + mojo::InterfaceRequest<mojom::MojoTest> request) {
|
| + new MojoTestImpl(std::move(request));
|
| +}
|
| +
|
| +MojoTestImpl::MojoTestImpl(mojo::InterfaceRequest<mojom::MojoTest> request)
|
| + : binding_(this, std::move(request)) {}
|
| +
|
| +MojoTestImpl::~MojoTestImpl() {}
|
| +
|
| +void MojoTestImpl::MakeSharedBuffer(uint32_t size,
|
| + const MakeSharedBufferCallback& callback) {
|
| + mojo::ScopedSharedBufferHandle handle;
|
| + MojoResult result = mojo::CreateSharedBuffer(nullptr, size, &handle);
|
| + LOG(INFO) << "mojo::CreateSharedBuffer result: " << result;
|
| + callback.Run(std::move(handle));
|
| +}
|
| +
|
| +
|
| +} // namespace content
|
|
|