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

Unified Diff: mojo/edk/system/platform_handle_dispatcher.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, 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/system/platform_handle_dispatcher.h
diff --git a/third_party/mojo/src/mojo/edk/system/platform_handle_dispatcher.h b/mojo/edk/system/platform_handle_dispatcher.h
similarity index 56%
copy from third_party/mojo/src/mojo/edk/system/platform_handle_dispatcher.h
copy to mojo/edk/system/platform_handle_dispatcher.h
index 0dde78ca174281a5d46057aa90d6e3fae71503a3..99ffcac7b06acb61faf3d75a39e9f8cfb128ad36 100644
--- a/third_party/mojo/src/mojo/edk/system/platform_handle_dispatcher.h
+++ b/mojo/edk/system/platform_handle_dispatcher.h
@@ -2,16 +2,16 @@
// 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_PLATFORM_HANDLE_DISPATCHER_H_
-#define THIRD_PARTY_MOJO_SRC_MOJO_EDK_SYSTEM_PLATFORM_HANDLE_DISPATCHER_H_
+#ifndef MOJO_EDK_SYSTEM_PLATFORM_HANDLE_DISPATCHER_H_
+#define MOJO_EDK_SYSTEM_PLATFORM_HANDLE_DISPATCHER_H_
+#include "mojo/edk/embedder/scoped_platform_handle.h"
+#include "mojo/edk/system/simple_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/scoped_platform_handle.h"
-#include "third_party/mojo/src/mojo/edk/system/simple_dispatcher.h"
-#include "third_party/mojo/src/mojo/edk/system/system_impl_export.h"
namespace mojo {
-namespace system {
+namespace edk {
// A dispatcher that simply wraps/transports a |PlatformHandle| (only for use by
// the embedder).
@@ -19,12 +19,12 @@ class MOJO_SYSTEM_IMPL_EXPORT PlatformHandleDispatcher final
: public SimpleDispatcher {
public:
static scoped_refptr<PlatformHandleDispatcher> Create(
- embedder::ScopedPlatformHandle platform_handle) {
+ ScopedPlatformHandle platform_handle) {
return make_scoped_refptr(
new PlatformHandleDispatcher(platform_handle.Pass()));
}
- embedder::ScopedPlatformHandle PassPlatformHandle();
+ ScopedPlatformHandle PassPlatformHandle();
// |Dispatcher| public methods:
Type GetType() const override;
@@ -32,37 +32,32 @@ class MOJO_SYSTEM_IMPL_EXPORT PlatformHandleDispatcher final
// The "opposite" of |SerializeAndClose()|. (Typically this is called by
// |Dispatcher::Deserialize()|.)
static scoped_refptr<PlatformHandleDispatcher> Deserialize(
- Channel* channel,
const void* source,
size_t size,
- embedder::PlatformHandleVector* platform_handles);
+ PlatformHandleVector* platform_handles);
private:
explicit PlatformHandleDispatcher(
- embedder::ScopedPlatformHandle platform_handle);
+ ScopedPlatformHandle platform_handle);
~PlatformHandleDispatcher() override;
// |Dispatcher| protected methods:
void CloseImplNoLock() override;
scoped_refptr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock()
override;
- void StartSerializeImplNoLock(Channel* channel,
- size_t* max_size,
- size_t* max_platform_handles) override
- MOJO_NOT_THREAD_SAFE;
+ void StartSerializeImplNoLock(size_t* max_size,
+ size_t* max_platform_handles) override;
bool EndSerializeAndCloseImplNoLock(
- Channel* channel,
void* destination,
size_t* actual_size,
- embedder::PlatformHandleVector* platform_handles) override
- MOJO_NOT_THREAD_SAFE;
+ PlatformHandleVector* platform_handles) override;
- embedder::ScopedPlatformHandle platform_handle_ MOJO_GUARDED_BY(mutex());
+ ScopedPlatformHandle platform_handle_;
MOJO_DISALLOW_COPY_AND_ASSIGN(PlatformHandleDispatcher);
};
-} // namespace system
+} // namespace edk
} // namespace mojo
-#endif // THIRD_PARTY_MOJO_SRC_MOJO_EDK_SYSTEM_PLATFORM_HANDLE_DISPATCHER_H_
+#endif // MOJO_EDK_SYSTEM_PLATFORM_HANDLE_DISPATCHER_H_

Powered by Google App Engine
This is Rietveld 408576698