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

Side by Side Diff: third_party/WebKit/Source/core/mojo/Mojo.cpp

Issue 2400563002: Adds Mojo IDL. (Closed)
Patch Set: removes visitDOMWrapper Created 3 years, 10 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 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 "core/mojo/Mojo.h"
6
7 #include "core/mojo/MojoCreateMessagePipeResult.h"
8 #include "core/mojo/MojoHandle.h"
9
10 namespace blink {
11
12 // static
13 void Mojo::createMessagePipe(MojoCreateMessagePipeResult& resultDict) {
14 MojoCreateMessagePipeOptions options = {0};
15 options.struct_size = sizeof(::MojoCreateMessagePipeOptions);
16 options.flags = MOJO_CREATE_MESSAGE_PIPE_OPTIONS_FLAG_NONE;
17
18 mojo::ScopedMessagePipeHandle handle0, handle1;
19 MojoResult result = mojo::CreateMessagePipe(&options, &handle0, &handle1);
20
21 resultDict.setResult(result);
22 if (result == MOJO_RESULT_OK) {
23 resultDict.setHandle0(
24 MojoHandle::create(mojo::ScopedHandle::From(std::move(handle0))));
25 resultDict.setHandle1(
26 MojoHandle::create(mojo::ScopedHandle::From(std::move(handle1))));
27 }
28 }
29
30 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698