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

Unified Diff: mojo/edk/system/broker_state.cc

Issue 1555273002: [mojo] Add CreateSharedBuffer method to Broker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/edk/system/broker_state.h ('k') | mojo/edk/system/child_broker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/broker_state.cc
diff --git a/mojo/edk/system/broker_state.cc b/mojo/edk/system/broker_state.cc
index a81f1a1b53d980b1c3d41a3768ea268f3dc5ffa3..0c422bceb2b7adc26e0df698666058121c9e733a 100644
--- a/mojo/edk/system/broker_state.cc
+++ b/mojo/edk/system/broker_state.cc
@@ -11,6 +11,8 @@
#include "base/rand_util.h"
#include "mojo/edk/embedder/embedder_internal.h"
#include "mojo/edk/embedder/platform_channel_pair.h"
+#include "mojo/edk/embedder/platform_shared_buffer.h"
+#include "mojo/edk/embedder/platform_support.h"
#include "mojo/edk/system/child_broker_host.h"
#include "mojo/edk/system/message_pipe_dispatcher.h"
#include "mojo/edk/system/routed_raw_channel.h"
@@ -65,6 +67,11 @@ void BrokerState::TokenToHandle(const uint64_t* tokens,
}
}
}
+#else
+scoped_refptr<PlatformSharedBuffer> BrokerState::CreateSharedBuffer(
+ size_t num_bytes) {
+ return internal::g_platform_support->CreateSharedBuffer(num_bytes);
+}
#endif
void BrokerState::ConnectMessagePipe(uint64_t pipe_id,
« no previous file with comments | « mojo/edk/system/broker_state.h ('k') | mojo/edk/system/child_broker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698