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_CHANNEL_H_ | 5 #ifndef MOJO_EDK_SYSTEM_CHANNEL_H_ |
6 #define MOJO_EDK_SYSTEM_CHANNEL_H_ | 6 #define MOJO_EDK_SYSTEM_CHANNEL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 121 |
122 // See |RawChannel::GetSerializedPlatformHandleSize()|. | 122 // See |RawChannel::GetSerializedPlatformHandleSize()|. |
123 size_t GetSerializedPlatformHandleSize() const; | 123 size_t GetSerializedPlatformHandleSize() const; |
124 | 124 |
125 embedder::PlatformSupport* platform_support() const { | 125 embedder::PlatformSupport* platform_support() const { |
126 return platform_support_; | 126 return platform_support_; |
127 } | 127 } |
128 | 128 |
129 private: | 129 private: |
130 friend class base::RefCountedThreadSafe<Channel>; | 130 friend class base::RefCountedThreadSafe<Channel>; |
131 virtual ~Channel(); | 131 ~Channel() override; |
132 | 132 |
133 // |RawChannel::Delegate| implementation (only called on the creation thread): | 133 // |RawChannel::Delegate| implementation (only called on the creation thread): |
134 virtual void OnReadMessage( | 134 void OnReadMessage( |
135 const MessageInTransit::View& message_view, | 135 const MessageInTransit::View& message_view, |
136 embedder::ScopedPlatformHandleVectorPtr platform_handles) override; | 136 embedder::ScopedPlatformHandleVectorPtr platform_handles) override; |
137 virtual void OnError(Error error) override; | 137 void OnError(Error error) override; |
138 | 138 |
139 // Helpers for |OnReadMessage| (only called on the creation thread): | 139 // Helpers for |OnReadMessage| (only called on the creation thread): |
140 void OnReadMessageForDownstream( | 140 void OnReadMessageForDownstream( |
141 const MessageInTransit::View& message_view, | 141 const MessageInTransit::View& message_view, |
142 embedder::ScopedPlatformHandleVectorPtr platform_handles); | 142 embedder::ScopedPlatformHandleVectorPtr platform_handles); |
143 void OnReadMessageForChannel( | 143 void OnReadMessageForChannel( |
144 const MessageInTransit::View& message_view, | 144 const MessageInTransit::View& message_view, |
145 embedder::ScopedPlatformHandleVectorPtr platform_handles); | 145 embedder::ScopedPlatformHandleVectorPtr platform_handles); |
146 | 146 |
147 // Handles "attach and run endpoint" messages. | 147 // Handles "attach and run endpoint" messages. |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 // if/when we wrap). | 198 // if/when we wrap). |
199 RemoteChannelEndpointIdGenerator remote_id_generator_; | 199 RemoteChannelEndpointIdGenerator remote_id_generator_; |
200 | 200 |
201 DISALLOW_COPY_AND_ASSIGN(Channel); | 201 DISALLOW_COPY_AND_ASSIGN(Channel); |
202 }; | 202 }; |
203 | 203 |
204 } // namespace system | 204 } // namespace system |
205 } // namespace mojo | 205 } // namespace mojo |
206 | 206 |
207 #endif // MOJO_EDK_SYSTEM_CHANNEL_H_ | 207 #endif // MOJO_EDK_SYSTEM_CHANNEL_H_ |
OLD | NEW |