Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: content/shell/utility/mojo_test_impl.cc

Issue 1799923003: Add an end-to-end test that excercises Mojo with a sandbox. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/shell/utility/mojo_test_impl.h ('k') | content/shell/utility/shell_content_utility_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « content/shell/utility/mojo_test_impl.h ('k') | content/shell/utility/shell_content_utility_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698