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

Side by Side Diff: mojo/runner/platform_handle_impl.cc

Issue 1350023003: Add a Mojo EDK for Chrome that uses one OS pipe per message pipe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: convert remaining MP tests and simplify RawChannel destruction Created 5 years, 3 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/platform_handle/platform_handle.h" 5 #include "mojo/platform_handle/platform_handle.h"
6
7 #if defined(USE_CHROME_EDK)
8 #include "mojo/edk/embedder/embedder.h"
9 #else
6 #include "third_party/mojo/src/mojo/edk/embedder/embedder.h" 10 #include "third_party/mojo/src/mojo/edk/embedder/embedder.h"
11 #endif
7 12
8 extern "C" { 13 extern "C" {
9 14
10 MojoResult MojoCreatePlatformHandleWrapper(MojoPlatformHandle platform_handle, 15 MojoResult MojoCreatePlatformHandleWrapper(MojoPlatformHandle platform_handle,
11 MojoHandle* wrapper) { 16 MojoHandle* wrapper) {
12 mojo::embedder::PlatformHandle platform_handle_wrapper(platform_handle); 17 mojo::embedder::PlatformHandle platform_handle_wrapper(platform_handle);
13 mojo::embedder::ScopedPlatformHandle scoped_platform_handle( 18 mojo::embedder::ScopedPlatformHandle scoped_platform_handle(
14 platform_handle_wrapper); 19 platform_handle_wrapper);
15 return mojo::embedder::CreatePlatformHandleWrapper( 20 return mojo::embedder::CreatePlatformHandleWrapper(
16 scoped_platform_handle.Pass(), wrapper); 21 scoped_platform_handle.Pass(), wrapper);
(...skipping 12 matching lines...) Expand all
29 *platform_handle = scoped_platform_handle.release().fd; 34 *platform_handle = scoped_platform_handle.release().fd;
30 #elif defined(OS_WIN) 35 #elif defined(OS_WIN)
31 *platform_handle = scoped_platform_handle.release().handle; 36 *platform_handle = scoped_platform_handle.release().handle;
32 #else 37 #else
33 #error "Platform not yet supported." 38 #error "Platform not yet supported."
34 #endif 39 #endif
35 return MOJO_RESULT_OK; 40 return MOJO_RESULT_OK;
36 } 41 }
37 42
38 } // extern "C" 43 } // extern "C"
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698