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

Side by Side Diff: mojo/edk/embedder/entrypoints.cc

Issue 1676913002: [mojo] Delete third_party/mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: let's try that again Created 4 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
« no previous file with comments | « mojo/edk/embedder/embedder_unittest.cc ('k') | mojo/edk/js/core.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include "mojo/edk/embedder/embedder_internal.h" 7 #include "mojo/edk/embedder/embedder_internal.h"
8 #include "mojo/edk/system/core.h" 8 #include "mojo/edk/system/core.h"
9 #include "mojo/public/c/system/buffer.h" 9 #include "mojo/public/c/system/buffer.h"
10 #include "mojo/public/c/system/data_pipe.h" 10 #include "mojo/public/c/system/data_pipe.h"
11 #include "mojo/public/c/system/functions.h" 11 #include "mojo/public/c/system/functions.h"
12 #include "mojo/public/c/system/message_pipe.h" 12 #include "mojo/public/c/system/message_pipe.h"
13 #include "mojo/public/c/system/wait_set.h"
13 14
14 using mojo::edk::internal::g_core; 15 using mojo::edk::internal::g_core;
15 16
16 // TODO(use_chrome_edk): commented out since for now we use the entrypoints in
17 // third_party and that checks the command line to redirect here.
18 /*
19
20 // Definitions of the system functions. 17 // Definitions of the system functions.
21 extern "C" { 18 extern "C" {
19
22 MojoTimeTicks MojoGetTimeTicksNow() { 20 MojoTimeTicks MojoGetTimeTicksNow() {
23 return g_core->GetTimeTicksNow(); 21 return g_core->GetTimeTicksNow();
24 } 22 }
25 23
26 MojoResult MojoClose(MojoHandle handle) { 24 MojoResult MojoClose(MojoHandle handle) {
27 return g_core->Close(handle); 25 return g_core->Close(handle);
28 } 26 }
29 27
30 MojoResult MojoWait(MojoHandle handle, 28 MojoResult MojoWait(MojoHandle handle,
31 MojoHandleSignals signals, 29 MojoHandleSignals signals,
32 MojoDeadline deadline, 30 MojoDeadline deadline,
33 MojoHandleSignalsState* signals_state) { 31 MojoHandleSignalsState* signals_state) {
34 return g_core->Wait(handle, signals, deadline, signals_state); 32 return g_core->Wait(handle, signals, deadline, signals_state);
35 } 33 }
36 34
37 MojoResult MojoWaitMany(const MojoHandle* handles, 35 MojoResult MojoWaitMany(const MojoHandle* handles,
38 const MojoHandleSignals* signals, 36 const MojoHandleSignals* signals,
39 uint32_t num_handles, 37 uint32_t num_handles,
40 MojoDeadline deadline, 38 MojoDeadline deadline,
41 uint32_t* result_index, 39 uint32_t* result_index,
42 MojoHandleSignalsState* signals_states) { 40 MojoHandleSignalsState* signals_states) {
43 return g_core->WaitMany(handles, signals, num_handles, deadline, result_index, 41 return g_core->WaitMany(handles, signals, num_handles, deadline, result_index,
44 signals_states); 42 signals_states);
45 } 43 }
46 44
45 MojoResult MojoCreateWaitSet(MojoHandle* wait_set_handle) {
46 return g_core->CreateWaitSet(wait_set_handle);
47 }
48
49 MojoResult MojoAddHandle(MojoHandle wait_set_handle,
50 MojoHandle handle,
51 MojoHandleSignals signals) {
52 return g_core->AddHandle(wait_set_handle, handle, signals);
53 }
54
55 MojoResult MojoRemoveHandle(MojoHandle wait_set_handle, MojoHandle handle) {
56 return g_core->RemoveHandle(wait_set_handle, handle);
57 }
58
59 MojoResult MojoGetReadyHandles(MojoHandle wait_set_handle,
60 uint32_t* count,
61 MojoHandle* handles,
62 MojoResult* results,
63 struct MojoHandleSignalsState* signals_states) {
64 return g_core->GetReadyHandles(wait_set_handle, count, handles, results,
65 signals_states);
66 }
67
47 MojoResult MojoCreateMessagePipe(const MojoCreateMessagePipeOptions* options, 68 MojoResult MojoCreateMessagePipe(const MojoCreateMessagePipeOptions* options,
48 MojoHandle* message_pipe_handle0, 69 MojoHandle* message_pipe_handle0,
49 MojoHandle* message_pipe_handle1) { 70 MojoHandle* message_pipe_handle1) {
50 return g_core->CreateMessagePipe(options, message_pipe_handle0, 71 return g_core->CreateMessagePipe(options, message_pipe_handle0,
51 message_pipe_handle1); 72 message_pipe_handle1);
52 } 73 }
53 74
54 MojoResult MojoWriteMessage(MojoHandle message_pipe_handle, 75 MojoResult MojoWriteMessage(MojoHandle message_pipe_handle,
55 const void* bytes, 76 const void* bytes,
56 uint32_t num_bytes, 77 uint32_t num_bytes,
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 void** buffer, 162 void** buffer,
142 MojoMapBufferFlags flags) { 163 MojoMapBufferFlags flags) {
143 return g_core->MapBuffer(buffer_handle, offset, num_bytes, buffer, flags); 164 return g_core->MapBuffer(buffer_handle, offset, num_bytes, buffer, flags);
144 } 165 }
145 166
146 MojoResult MojoUnmapBuffer(void* buffer) { 167 MojoResult MojoUnmapBuffer(void* buffer) {
147 return g_core->UnmapBuffer(buffer); 168 return g_core->UnmapBuffer(buffer);
148 } 169 }
149 170
150 } // extern "C" 171 } // extern "C"
151 */
OLDNEW
« no previous file with comments | « mojo/edk/embedder/embedder_unittest.cc ('k') | mojo/edk/js/core.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698