OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 #include "content/shell/utility/mojo_test_impl.h" |
| 6 |
| 7 #include <utility> |
| 8 |
| 9 #include "mojo/public/cpp/system/buffer.h" |
| 10 |
| 11 namespace content { |
| 12 |
| 13 // static |
| 14 void MojoTestImpl::CreateMojoTestImpl( |
| 15 mojo::InterfaceRequest<mojom::MojoTest> request) { |
| 16 new MojoTestImpl(std::move(request)); |
| 17 } |
| 18 |
| 19 MojoTestImpl::MojoTestImpl(mojo::InterfaceRequest<mojom::MojoTest> request) |
| 20 : binding_(this, std::move(request)) {} |
| 21 |
| 22 MojoTestImpl::~MojoTestImpl() {} |
| 23 |
| 24 void MojoTestImpl::MakeSharedBuffer(uint32_t size, |
| 25 const MakeSharedBufferCallback& callback) { |
| 26 mojo::ScopedSharedBufferHandle handle; |
| 27 MojoResult result = mojo::CreateSharedBuffer(nullptr, size, &handle); |
| 28 LOG(INFO) << "mojo::CreateSharedBuffer result: " << result; |
| 29 callback.Run(std::move(handle)); |
| 30 } |
| 31 |
| 32 |
| 33 } // namespace content |
OLD | NEW |