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

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

Issue 1478503003: EDK: Convert most uses of PlatformHandleVector to std::vector<ScopedPlatformHandle>. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « mojo/edk/system/master_connection_manager.cc ('k') | mojo/edk/system/message_pipe.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_MESSAGE_PIPE_H_ 5 #ifndef MOJO_EDK_SYSTEM_MESSAGE_PIPE_H_
6 #define MOJO_EDK_SYSTEM_MESSAGE_PIPE_H_ 6 #define MOJO_EDK_SYSTEM_MESSAGE_PIPE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <memory> 11 #include <memory>
12 #include <vector> 12 #include <vector>
13 13
14 #include "mojo/edk/embedder/platform_handle_vector.h" 14 #include "mojo/edk/embedder/scoped_platform_handle.h"
15 #include "mojo/edk/system/channel_endpoint_client.h" 15 #include "mojo/edk/system/channel_endpoint_client.h"
16 #include "mojo/edk/system/dispatcher.h" 16 #include "mojo/edk/system/dispatcher.h"
17 #include "mojo/edk/system/handle_signals_state.h" 17 #include "mojo/edk/system/handle_signals_state.h"
18 #include "mojo/edk/system/memory.h" 18 #include "mojo/edk/system/memory.h"
19 #include "mojo/edk/system/message_in_transit.h" 19 #include "mojo/edk/system/message_in_transit.h"
20 #include "mojo/edk/system/message_pipe_endpoint.h" 20 #include "mojo/edk/system/message_pipe_endpoint.h"
21 #include "mojo/edk/util/mutex.h" 21 #include "mojo/edk/util/mutex.h"
22 #include "mojo/edk/util/ref_ptr.h" 22 #include "mojo/edk/util/ref_ptr.h"
23 #include "mojo/edk/util/thread_annotations.h" 23 #include "mojo/edk/util/thread_annotations.h"
24 #include "mojo/public/c/system/message_pipe.h" 24 #include "mojo/public/c/system/message_pipe.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 MojoHandleSignals signals, 102 MojoHandleSignals signals,
103 uint32_t context, 103 uint32_t context,
104 HandleSignalsState* signals_state); 104 HandleSignalsState* signals_state);
105 void RemoveAwakable(unsigned port, 105 void RemoveAwakable(unsigned port,
106 Awakable* awakable, 106 Awakable* awakable,
107 HandleSignalsState* signals_state); 107 HandleSignalsState* signals_state);
108 void StartSerialize(unsigned port, 108 void StartSerialize(unsigned port,
109 Channel* channel, 109 Channel* channel,
110 size_t* max_size, 110 size_t* max_size,
111 size_t* max_platform_handles); 111 size_t* max_platform_handles);
112 bool EndSerialize(unsigned port, 112 bool EndSerialize(
113 Channel* channel, 113 unsigned port,
114 void* destination, 114 Channel* channel,
115 size_t* actual_size, 115 void* destination,
116 embedder::PlatformHandleVector* platform_handles); 116 size_t* actual_size,
117 std::vector<embedder::ScopedPlatformHandle>* platform_handles);
117 118
118 // |ChannelEndpointClient| methods: 119 // |ChannelEndpointClient| methods:
119 bool OnReadMessage(unsigned port, MessageInTransit* message) override; 120 bool OnReadMessage(unsigned port, MessageInTransit* message) override;
120 void OnDetachFromChannel(unsigned port) override; 121 void OnDetachFromChannel(unsigned port) override;
121 122
122 private: 123 private:
123 MessagePipe(); 124 MessagePipe();
124 ~MessagePipe() override; 125 ~MessagePipe() override;
125 126
126 // This is used internally by |WriteMessage()| and by |OnReadMessage()|. 127 // This is used internally by |WriteMessage()| and by |OnReadMessage()|.
(...skipping 14 matching lines...) Expand all
141 mutable util::Mutex mutex_; 142 mutable util::Mutex mutex_;
142 std::unique_ptr<MessagePipeEndpoint> endpoints_[2] MOJO_GUARDED_BY(mutex_); 143 std::unique_ptr<MessagePipeEndpoint> endpoints_[2] MOJO_GUARDED_BY(mutex_);
143 144
144 MOJO_DISALLOW_COPY_AND_ASSIGN(MessagePipe); 145 MOJO_DISALLOW_COPY_AND_ASSIGN(MessagePipe);
145 }; 146 };
146 147
147 } // namespace system 148 } // namespace system
148 } // namespace mojo 149 } // namespace mojo
149 150
150 #endif // MOJO_EDK_SYSTEM_MESSAGE_PIPE_H_ 151 #endif // MOJO_EDK_SYSTEM_MESSAGE_PIPE_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/master_connection_manager.cc ('k') | mojo/edk/system/message_pipe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698