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

Unified Diff: mojo/edk/system/transport_data.h

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: more cleanup Created 5 years, 2 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/system/transport_data.h
diff --git a/third_party/mojo/src/mojo/edk/system/transport_data.h b/mojo/edk/system/transport_data.h
similarity index 89%
copy from third_party/mojo/src/mojo/edk/system/transport_data.h
copy to mojo/edk/system/transport_data.h
index ea94139d7c53e4c2224b47e1f2e445dfa6f88b8c..7d51ee9a1ad7e391f7ed3cd754af44807376f43b 100644
--- a/third_party/mojo/src/mojo/edk/system/transport_data.h
+++ b/mojo/edk/system/transport_data.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef THIRD_PARTY_MOJO_SRC_MOJO_EDK_SYSTEM_TRANSPORT_DATA_H_
-#define THIRD_PARTY_MOJO_SRC_MOJO_EDK_SYSTEM_TRANSPORT_DATA_H_
+#ifndef MOJO_EDK_SYSTEM_TRANSPORT_DATA_H_
+#define MOJO_EDK_SYSTEM_TRANSPORT_DATA_H_
#include <stdint.h>
@@ -12,16 +12,14 @@
#include "base/memory/aligned_memory.h"
#include "base/memory/scoped_ptr.h"
#include "build/build_config.h"
+#include "mojo/edk/embedder/platform_handle.h"
+#include "mojo/edk/embedder/platform_handle_vector.h"
+#include "mojo/edk/system/dispatcher.h"
+#include "mojo/edk/system/system_impl_export.h"
#include "mojo/public/cpp/system/macros.h"
-#include "third_party/mojo/src/mojo/edk/embedder/platform_handle.h"
-#include "third_party/mojo/src/mojo/edk/embedder/platform_handle_vector.h"
-#include "third_party/mojo/src/mojo/edk/system/dispatcher.h"
-#include "third_party/mojo/src/mojo/edk/system/system_impl_export.h"
namespace mojo {
-namespace system {
-
-class Channel;
+namespace edk {
// This class is used by |MessageInTransit| to represent handles (|Dispatcher|s)
// in various stages of serialization.
@@ -89,14 +87,14 @@ class MOJO_SYSTEM_IMPL_EXPORT TransportData {
// The maximum total number of platform handles that may be attached.
static size_t GetMaxPlatformHandles();
- TransportData(scoped_ptr<DispatcherVector> dispatchers, Channel* channel);
+ explicit TransportData(scoped_ptr<DispatcherVector> dispatchers);
// This is used for users of |MessageInTransit|/|TransportData|/|RawChannel|
// that want to simply transport data and platform handles, and not
// |Dispatcher|s. (|Header| will be present, and zero except for
// |num_platform_handles|, and |platform_handle_table_offset| if necessary.)
explicit TransportData(
- embedder::ScopedPlatformHandleVectorPtr platform_handles,
+ ScopedPlatformHandleVectorPtr platform_handles,
size_t serialized_platform_handle_size);
~TransportData();
@@ -111,10 +109,10 @@ class MOJO_SYSTEM_IMPL_EXPORT TransportData {
// Gets attached platform-specific handles; this may return null if there are
// none. Note that the caller may mutate the set of platform-specific handles.
- const embedder::PlatformHandleVector* platform_handles() const {
+ const PlatformHandleVector* platform_handles() const {
return platform_handles_.get();
}
- embedder::PlatformHandleVector* platform_handles() {
+ PlatformHandleVector* platform_handles() {
return platform_handles_.get();
}
@@ -143,8 +141,7 @@ class MOJO_SYSTEM_IMPL_EXPORT TransportData {
static scoped_ptr<DispatcherVector> DeserializeDispatchers(
const void* buffer,
size_t buffer_size,
- embedder::ScopedPlatformHandleVectorPtr platform_handles,
- Channel* channel);
+ ScopedPlatformHandleVectorPtr platform_handles);
private:
// To allow us to make compile-assertions about |Header|, etc. in the .cc
@@ -180,12 +177,12 @@ class MOJO_SYSTEM_IMPL_EXPORT TransportData {
// transport). The vector (if any) owns the handles that it contains (and is
// responsible for closing them).
// TODO(vtl): With C++11, change it to a vector of |ScopedPlatformHandle|s.
- embedder::ScopedPlatformHandleVectorPtr platform_handles_;
+ ScopedPlatformHandleVectorPtr platform_handles_;
MOJO_DISALLOW_COPY_AND_ASSIGN(TransportData);
};
-} // namespace system
+} // namespace edk
} // namespace mojo
-#endif // THIRD_PARTY_MOJO_SRC_MOJO_EDK_SYSTEM_TRANSPORT_DATA_H_
+#endif // MOJO_EDK_SYSTEM_TRANSPORT_DATA_H_

Powered by Google App Engine
This is Rietveld 408576698