| OLD | NEW |
| 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/scoped_platform_handle.h" | 14 #include "mojo/edk/platform/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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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( | 112 bool EndSerialize( |
| 113 unsigned port, | 113 unsigned port, |
| 114 Channel* channel, | 114 Channel* channel, |
| 115 void* destination, | 115 void* destination, |
| 116 size_t* actual_size, | 116 size_t* actual_size, |
| 117 std::vector<embedder::ScopedPlatformHandle>* platform_handles); | 117 std::vector<platform::ScopedPlatformHandle>* platform_handles); |
| 118 | 118 |
| 119 // |ChannelEndpointClient| methods: | 119 // |ChannelEndpointClient| methods: |
| 120 bool OnReadMessage(unsigned port, MessageInTransit* message) override; | 120 bool OnReadMessage(unsigned port, MessageInTransit* message) override; |
| 121 void OnDetachFromChannel(unsigned port) override; | 121 void OnDetachFromChannel(unsigned port) override; |
| 122 | 122 |
| 123 private: | 123 private: |
| 124 MessagePipe(); | 124 MessagePipe(); |
| 125 ~MessagePipe() override; | 125 ~MessagePipe() override; |
| 126 | 126 |
| 127 // 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 Loading... |
| 142 mutable util::Mutex mutex_; | 142 mutable util::Mutex mutex_; |
| 143 std::unique_ptr<MessagePipeEndpoint> endpoints_[2] MOJO_GUARDED_BY(mutex_); | 143 std::unique_ptr<MessagePipeEndpoint> endpoints_[2] MOJO_GUARDED_BY(mutex_); |
| 144 | 144 |
| 145 MOJO_DISALLOW_COPY_AND_ASSIGN(MessagePipe); | 145 MOJO_DISALLOW_COPY_AND_ASSIGN(MessagePipe); |
| 146 }; | 146 }; |
| 147 | 147 |
| 148 } // namespace system | 148 } // namespace system |
| 149 } // namespace mojo | 149 } // namespace mojo |
| 150 | 150 |
| 151 #endif // MOJO_EDK_SYSTEM_MESSAGE_PIPE_H_ | 151 #endif // MOJO_EDK_SYSTEM_MESSAGE_PIPE_H_ |
| OLD | NEW |