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

Side by Side Diff: mojo/edk/system/platform_handle_dispatcher.h

Issue 1943123002: Make it possible to write a message pipe endpoint's peer into it. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 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
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 #ifndef MOJO_EDK_SYSTEM_PLATFORM_HANDLE_DISPATCHER_H_ 5 #ifndef MOJO_EDK_SYSTEM_PLATFORM_HANDLE_DISPATCHER_H_
6 #define MOJO_EDK_SYSTEM_PLATFORM_HANDLE_DISPATCHER_H_ 6 #define MOJO_EDK_SYSTEM_PLATFORM_HANDLE_DISPATCHER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "mojo/edk/platform/scoped_platform_handle.h" 10 #include "mojo/edk/platform/scoped_platform_handle.h"
(...skipping 28 matching lines...) Expand all
39 size_t size, 39 size_t size,
40 std::vector<platform::ScopedPlatformHandle>* platform_handles); 40 std::vector<platform::ScopedPlatformHandle>* platform_handles);
41 41
42 private: 42 private:
43 explicit PlatformHandleDispatcher( 43 explicit PlatformHandleDispatcher(
44 platform::ScopedPlatformHandle platform_handle); 44 platform::ScopedPlatformHandle platform_handle);
45 ~PlatformHandleDispatcher() override; 45 ~PlatformHandleDispatcher() override;
46 46
47 // |Dispatcher| protected methods: 47 // |Dispatcher| protected methods:
48 void CloseImplNoLock() override; 48 void CloseImplNoLock() override;
49 util::RefPtr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock() 49 util::RefPtr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock(
50 override; 50 MessagePipe* message_pipe,
51 unsigned port) override;
51 void StartSerializeImplNoLock(Channel* channel, 52 void StartSerializeImplNoLock(Channel* channel,
52 size_t* max_size, 53 size_t* max_size,
53 size_t* max_platform_handles) override 54 size_t* max_platform_handles) override
54 MOJO_NOT_THREAD_SAFE; 55 MOJO_NOT_THREAD_SAFE;
55 bool EndSerializeAndCloseImplNoLock( 56 bool EndSerializeAndCloseImplNoLock(
56 Channel* channel, 57 Channel* channel,
57 void* destination, 58 void* destination,
58 size_t* actual_size, 59 size_t* actual_size,
59 std::vector<platform::ScopedPlatformHandle>* platform_handles) override 60 std::vector<platform::ScopedPlatformHandle>* platform_handles) override
60 MOJO_NOT_THREAD_SAFE; 61 MOJO_NOT_THREAD_SAFE;
61 62
62 platform::ScopedPlatformHandle platform_handle_ MOJO_GUARDED_BY(mutex()); 63 platform::ScopedPlatformHandle platform_handle_ MOJO_GUARDED_BY(mutex());
63 64
64 MOJO_DISALLOW_COPY_AND_ASSIGN(PlatformHandleDispatcher); 65 MOJO_DISALLOW_COPY_AND_ASSIGN(PlatformHandleDispatcher);
65 }; 66 };
66 67
67 } // namespace system 68 } // namespace system
68 } // namespace mojo 69 } // namespace mojo
69 70
70 #endif // MOJO_EDK_SYSTEM_PLATFORM_HANDLE_DISPATCHER_H_ 71 #endif // MOJO_EDK_SYSTEM_PLATFORM_HANDLE_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698