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

Unified Diff: mojo/edk/embedder/system_impl_private_entrypoints.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: move to mojo::edk namespace in preparation for runtim flag 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 side-by-side diff with in-line comments
Download patch
Index: mojo/edk/embedder/system_impl_private_entrypoints.cc
diff --git a/third_party/mojo/src/mojo/edk/embedder/system_impl_private_entrypoints.cc b/mojo/edk/embedder/system_impl_private_entrypoints.cc
similarity index 87%
copy from third_party/mojo/src/mojo/edk/embedder/system_impl_private_entrypoints.cc
copy to mojo/edk/embedder/system_impl_private_entrypoints.cc
index 475ffa76b06b5bb21763e23298ce294670b06980..0aaf81ea220cef5a98c223d6e1f1ede0e7db3a4c 100644
--- a/third_party/mojo/src/mojo/edk/embedder/system_impl_private_entrypoints.cc
+++ b/mojo/edk/embedder/system_impl_private_entrypoints.cc
@@ -11,10 +11,10 @@
#include "mojo/public/c/system/message_pipe.h"
#include "mojo/public/platform/native/system_impl_private.h"
-using mojo::embedder::internal::g_core;
-using mojo::system::Core;
-using mojo::system::Dispatcher;
-using mojo::system::MakeUserPointer;
+using mojo::edk::internal::g_core;
+using mojo::edk::Core;
+using mojo::edk::Dispatcher;
+using mojo::edk::MakeUserPointer;
// Definitions of the system functions, but with an explicit parameter for the
// core object rather than using the default singleton. Also includes functions
@@ -69,13 +69,13 @@ MojoResult MojoSystemImplTransferHandle(MojoSystemImpl from_system,
}
MojoTimeTicks MojoSystemImplGetTimeTicksNow(MojoSystemImpl system) {
- mojo::system::Core* core = static_cast<mojo::system::Core*>(system);
+ mojo::edk::Core* core = static_cast<mojo::edk::Core*>(system);
DCHECK(core);
return core->GetTimeTicksNow();
}
MojoResult MojoSystemImplClose(MojoSystemImpl system, MojoHandle handle) {
- mojo::system::Core* core = static_cast<mojo::system::Core*>(system);
+ mojo::edk::Core* core = static_cast<mojo::edk::Core*>(system);
DCHECK(core);
return core->Close(handle);
}
@@ -85,7 +85,7 @@ MojoResult MojoSystemImplWait(MojoSystemImpl system,
MojoHandleSignals signals,
MojoDeadline deadline,
MojoHandleSignalsState* signals_state) {
- mojo::system::Core* core = static_cast<mojo::system::Core*>(system);
+ mojo::edk::Core* core = static_cast<mojo::edk::Core*>(system);
DCHECK(core);
return core->Wait(handle, signals, deadline, MakeUserPointer(signals_state));
}
@@ -97,7 +97,7 @@ MojoResult MojoSystemImplWaitMany(MojoSystemImpl system,
MojoDeadline deadline,
uint32_t* result_index,
MojoHandleSignalsState* signals_states) {
- mojo::system::Core* core = static_cast<mojo::system::Core*>(system);
+ mojo::edk::Core* core = static_cast<mojo::edk::Core*>(system);
DCHECK(core);
return core->WaitMany(MakeUserPointer(handles), MakeUserPointer(signals),
num_handles, deadline, MakeUserPointer(result_index),
@@ -109,7 +109,7 @@ MojoResult MojoSystemImplCreateMessagePipe(
const MojoCreateMessagePipeOptions* options,
MojoHandle* message_pipe_handle0,
MojoHandle* message_pipe_handle1) {
- mojo::system::Core* core = static_cast<mojo::system::Core*>(system);
+ mojo::edk::Core* core = static_cast<mojo::edk::Core*>(system);
DCHECK(core);
return core->CreateMessagePipe(MakeUserPointer(options),
MakeUserPointer(message_pipe_handle0),
@@ -123,7 +123,7 @@ MojoResult MojoSystemImplWriteMessage(MojoSystemImpl system,
const MojoHandle* handles,
uint32_t num_handles,
MojoWriteMessageFlags flags) {
- mojo::system::Core* core = static_cast<mojo::system::Core*>(system);
+ mojo::edk::Core* core = static_cast<mojo::edk::Core*>(system);
DCHECK(core);
return core->WriteMessage(message_pipe_handle, MakeUserPointer(bytes),
num_bytes, MakeUserPointer(handles), num_handles,
@@ -137,7 +137,7 @@ MojoResult MojoSystemImplReadMessage(MojoSystemImpl system,
MojoHandle* handles,
uint32_t* num_handles,
MojoReadMessageFlags flags) {
- mojo::system::Core* core = static_cast<mojo::system::Core*>(system);
+ mojo::edk::Core* core = static_cast<mojo::edk::Core*>(system);
DCHECK(core);
return core->ReadMessage(message_pipe_handle, MakeUserPointer(bytes),
MakeUserPointer(num_bytes), MakeUserPointer(handles),
@@ -149,7 +149,7 @@ MojoResult MojoSystemImplCreateDataPipe(
const MojoCreateDataPipeOptions* options,
MojoHandle* data_pipe_producer_handle,
MojoHandle* data_pipe_consumer_handle) {
- mojo::system::Core* core = static_cast<mojo::system::Core*>(system);
+ mojo::edk::Core* core = static_cast<mojo::edk::Core*>(system);
DCHECK(core);
return core->CreateDataPipe(MakeUserPointer(options),
MakeUserPointer(data_pipe_producer_handle),
@@ -161,7 +161,7 @@ MojoResult MojoSystemImplWriteData(MojoSystemImpl system,
const void* elements,
uint32_t* num_elements,
MojoWriteDataFlags flags) {
- mojo::system::Core* core = static_cast<mojo::system::Core*>(system);
+ mojo::edk::Core* core = static_cast<mojo::edk::Core*>(system);
DCHECK(core);
return core->WriteData(data_pipe_producer_handle, MakeUserPointer(elements),
MakeUserPointer(num_elements), flags);
@@ -172,7 +172,7 @@ MojoResult MojoSystemImplBeginWriteData(MojoSystemImpl system,
void** buffer,
uint32_t* buffer_num_elements,
MojoWriteDataFlags flags) {
- mojo::system::Core* core = static_cast<mojo::system::Core*>(system);
+ mojo::edk::Core* core = static_cast<mojo::edk::Core*>(system);
DCHECK(core);
return core->BeginWriteData(data_pipe_producer_handle,
MakeUserPointer(buffer),
@@ -182,7 +182,7 @@ MojoResult MojoSystemImplBeginWriteData(MojoSystemImpl system,
MojoResult MojoSystemImplEndWriteData(MojoSystemImpl system,
MojoHandle data_pipe_producer_handle,
uint32_t num_elements_written) {
- mojo::system::Core* core = static_cast<mojo::system::Core*>(system);
+ mojo::edk::Core* core = static_cast<mojo::edk::Core*>(system);
DCHECK(core);
return core->EndWriteData(data_pipe_producer_handle, num_elements_written);
}
@@ -192,7 +192,7 @@ MojoResult MojoSystemImplReadData(MojoSystemImpl system,
void* elements,
uint32_t* num_elements,
MojoReadDataFlags flags) {
- mojo::system::Core* core = static_cast<mojo::system::Core*>(system);
+ mojo::edk::Core* core = static_cast<mojo::edk::Core*>(system);
DCHECK(core);
return core->ReadData(data_pipe_consumer_handle, MakeUserPointer(elements),
MakeUserPointer(num_elements), flags);
@@ -203,7 +203,7 @@ MojoResult MojoSystemImplBeginReadData(MojoSystemImpl system,
const void** buffer,
uint32_t* buffer_num_elements,
MojoReadDataFlags flags) {
- mojo::system::Core* core = static_cast<mojo::system::Core*>(system);
+ mojo::edk::Core* core = static_cast<mojo::edk::Core*>(system);
DCHECK(core);
return core->BeginReadData(data_pipe_consumer_handle, MakeUserPointer(buffer),
MakeUserPointer(buffer_num_elements), flags);
@@ -212,7 +212,7 @@ MojoResult MojoSystemImplBeginReadData(MojoSystemImpl system,
MojoResult MojoSystemImplEndReadData(MojoSystemImpl system,
MojoHandle data_pipe_consumer_handle,
uint32_t num_elements_read) {
- mojo::system::Core* core = static_cast<mojo::system::Core*>(system);
+ mojo::edk::Core* core = static_cast<mojo::edk::Core*>(system);
DCHECK(core);
return core->EndReadData(data_pipe_consumer_handle, num_elements_read);
}
@@ -222,7 +222,7 @@ MojoResult MojoSystemImplCreateSharedBuffer(
const MojoCreateSharedBufferOptions* options,
uint64_t num_bytes,
MojoHandle* shared_buffer_handle) {
- mojo::system::Core* core = static_cast<mojo::system::Core*>(system);
+ mojo::edk::Core* core = static_cast<mojo::edk::Core*>(system);
DCHECK(core);
return core->CreateSharedBuffer(MakeUserPointer(options), num_bytes,
MakeUserPointer(shared_buffer_handle));
@@ -233,7 +233,7 @@ MojoResult MojoSystemImplDuplicateBufferHandle(
MojoHandle buffer_handle,
const MojoDuplicateBufferHandleOptions* options,
MojoHandle* new_buffer_handle) {
- mojo::system::Core* core = static_cast<mojo::system::Core*>(system);
+ mojo::edk::Core* core = static_cast<mojo::edk::Core*>(system);
DCHECK(core);
return core->DuplicateBufferHandle(buffer_handle, MakeUserPointer(options),
MakeUserPointer(new_buffer_handle));
@@ -245,14 +245,14 @@ MojoResult MojoSystemImplMapBuffer(MojoSystemImpl system,
uint64_t num_bytes,
void** buffer,
MojoMapBufferFlags flags) {
- mojo::system::Core* core = static_cast<mojo::system::Core*>(system);
+ mojo::edk::Core* core = static_cast<mojo::edk::Core*>(system);
DCHECK(core);
return core->MapBuffer(buffer_handle, offset, num_bytes,
MakeUserPointer(buffer), flags);
}
MojoResult MojoSystemImplUnmapBuffer(MojoSystemImpl system, void* buffer) {
- mojo::system::Core* core = static_cast<mojo::system::Core*>(system);
+ mojo::edk::Core* core = static_cast<mojo::edk::Core*>(system);
DCHECK(core);
return core->UnmapBuffer(MakeUserPointer(buffer));
}

Powered by Google App Engine
This is Rietveld 408576698