OLD | NEW |
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 IPC_IPC_CHANNEL_MOJO_H_ | 5 #ifndef IPC_IPC_CHANNEL_MOJO_H_ |
6 #define IPC_IPC_CHANNEL_MOJO_H_ | 6 #define IPC_IPC_CHANNEL_MOJO_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 typedef internal::MessagePipeReader::DelayedDeleter ReaderDeleter; | 99 typedef internal::MessagePipeReader::DelayedDeleter ReaderDeleter; |
100 | 100 |
101 class ControlReader; | 101 class ControlReader; |
102 class ServerControlReader; | 102 class ServerControlReader; |
103 class ClientControlReader; | 103 class ClientControlReader; |
104 class MessageReader; | 104 class MessageReader; |
105 | 105 |
106 ChannelMojo(scoped_ptr<Channel> bootstrap, Mode mode, Listener* listener, | 106 ChannelMojo(scoped_ptr<Channel> bootstrap, Mode mode, Listener* listener, |
107 scoped_refptr<base::TaskRunner> io_thread_task_runner); | 107 scoped_refptr<base::TaskRunner> io_thread_task_runner); |
108 | 108 |
109 void InitOnIOThread(mojo::ScopedMessagePipeHandle control_pipe); | 109 void InitOnIOThread(); |
110 scoped_ptr<ControlReader> CreateControlReader( | |
111 mojo::ScopedMessagePipeHandle pipe); | |
112 void DidCreateChannel(mojo::embedder::ChannelInfo*); | |
113 | 110 |
114 base::WeakPtrFactory<ChannelMojo> weak_factory_; | 111 base::WeakPtrFactory<ChannelMojo> weak_factory_; |
115 scoped_ptr<Channel> bootstrap_; | 112 scoped_ptr<Channel> bootstrap_; |
116 Mode mode_; | 113 Mode mode_; |
117 Listener* listener_; | 114 Listener* listener_; |
118 base::ProcessId peer_pid_; | 115 base::ProcessId peer_pid_; |
119 scoped_ptr<mojo::embedder::ChannelInfo, | 116 scoped_ptr<mojo::embedder::ChannelInfo, |
120 ChannelInfoDeleter> channel_info_; | 117 ChannelInfoDeleter> channel_info_; |
121 | 118 |
122 scoped_ptr<ControlReader, ReaderDeleter> control_reader_; | 119 scoped_ptr<ControlReader, ReaderDeleter> control_reader_; |
123 scoped_ptr<MessageReader, ReaderDeleter> message_reader_; | 120 scoped_ptr<MessageReader, ReaderDeleter> message_reader_; |
124 ScopedVector<Message> pending_messages_; | 121 ScopedVector<Message> pending_messages_; |
125 | 122 |
126 DISALLOW_COPY_AND_ASSIGN(ChannelMojo); | 123 DISALLOW_COPY_AND_ASSIGN(ChannelMojo); |
127 }; | 124 }; |
128 | 125 |
129 } // namespace IPC | 126 } // namespace IPC |
130 | 127 |
131 #endif // IPC_IPC_CHANNEL_MOJO_H_ | 128 #endif // IPC_IPC_CHANNEL_MOJO_H_ |
OLD | NEW |