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

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

Issue 1554443003: Stop linking in the old Mojo EDK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge and fix new flaky test Created 4 years, 11 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_internal.h ('k') | mojo/edk/system/BUILD.gn » ('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" {
22 MojoTimeTicks MojoGetTimeTicksNow() { 19 MojoTimeTicks MojoGetTimeTicksNow() {
23 return g_core->GetTimeTicksNow(); 20 return g_core->GetTimeTicksNow();
24 } 21 }
25 22
26 MojoResult MojoClose(MojoHandle handle) { 23 MojoResult MojoClose(MojoHandle handle) {
27 return g_core->Close(handle); 24 return g_core->Close(handle);
28 } 25 }
29 26
30 MojoResult MojoWait(MojoHandle handle, 27 MojoResult MojoWait(MojoHandle handle,
31 MojoHandleSignals signals, 28 MojoHandleSignals signals,
32 MojoDeadline deadline, 29 MojoDeadline deadline,
33 MojoHandleSignalsState* signals_state) { 30 MojoHandleSignalsState* signals_state) {
34 return g_core->Wait(handle, signals, deadline, signals_state); 31 return g_core->Wait(handle, signals, deadline, signals_state);
35 } 32 }
36 33
37 MojoResult MojoWaitMany(const MojoHandle* handles, 34 MojoResult MojoWaitMany(const MojoHandle* handles,
38 const MojoHandleSignals* signals, 35 const MojoHandleSignals* signals,
39 uint32_t num_handles, 36 uint32_t num_handles,
40 MojoDeadline deadline, 37 MojoDeadline deadline,
41 uint32_t* result_index, 38 uint32_t* result_index,
42 MojoHandleSignalsState* signals_states) { 39 MojoHandleSignalsState* signals_states) {
43 return g_core->WaitMany(handles, signals, num_handles, deadline, result_index, 40 return g_core->WaitMany(handles, signals, num_handles, deadline, result_index,
44 signals_states); 41 signals_states);
45 } 42 }
46 43
44 MojoResult MojoCreateWaitSet(MojoHandle* wait_set_handle) {
45 return g_core->CreateWaitSet(wait_set_handle);
46 }
47
48 MojoResult MojoAddHandle(MojoHandle wait_set_handle,
49 MojoHandle handle,
50 MojoHandleSignals signals) {
51 return g_core->AddHandle(wait_set_handle, handle, signals);
52 }
53
54 MojoResult MojoRemoveHandle(MojoHandle wait_set_handle,
55 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_internal.h ('k') | mojo/edk/system/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698