| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "ipc/ipc_channel_nacl.h" | 5 #include "ipc/ipc_channel_nacl.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <sys/types.h> | 9 #include <sys/types.h> |
| 10 | 10 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 // |main_message_loop|: A proxy for the main thread, where we will invoke the | 73 // |main_message_loop|: A proxy for the main thread, where we will invoke the |
| 74 // above callbacks. | 74 // above callbacks. |
| 75 ReaderThreadRunner( | 75 ReaderThreadRunner( |
| 76 int pipe, | 76 int pipe, |
| 77 base::Callback<void (scoped_ptr<MessageContents>)> data_read_callback, | 77 base::Callback<void (scoped_ptr<MessageContents>)> data_read_callback, |
| 78 base::Callback<void ()> failure_callback, | 78 base::Callback<void ()> failure_callback, |
| 79 scoped_refptr<base::MessageLoopProxy> main_message_loop); | 79 scoped_refptr<base::MessageLoopProxy> main_message_loop); |
| 80 | 80 |
| 81 // DelegateSimpleThread implementation. Reads data from the pipe in a loop | 81 // DelegateSimpleThread implementation. Reads data from the pipe in a loop |
| 82 // until either we are told to quit or a read fails. | 82 // until either we are told to quit or a read fails. |
| 83 virtual void Run() OVERRIDE; | 83 virtual void Run() override; |
| 84 | 84 |
| 85 private: | 85 private: |
| 86 int pipe_; | 86 int pipe_; |
| 87 base::Callback<void (scoped_ptr<MessageContents>)> data_read_callback_; | 87 base::Callback<void (scoped_ptr<MessageContents>)> data_read_callback_; |
| 88 base::Callback<void ()> failure_callback_; | 88 base::Callback<void ()> failure_callback_; |
| 89 scoped_refptr<base::MessageLoopProxy> main_message_loop_; | 89 scoped_refptr<base::MessageLoopProxy> main_message_loop_; |
| 90 | 90 |
| 91 DISALLOW_COPY_AND_ASSIGN(ReaderThreadRunner); | 91 DISALLOW_COPY_AND_ASSIGN(ReaderThreadRunner); |
| 92 }; | 92 }; |
| 93 | 93 |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 // Channel's methods | 372 // Channel's methods |
| 373 | 373 |
| 374 // static | 374 // static |
| 375 scoped_ptr<Channel> Channel::Create( | 375 scoped_ptr<Channel> Channel::Create( |
| 376 const IPC::ChannelHandle &channel_handle, Mode mode, Listener* listener) { | 376 const IPC::ChannelHandle &channel_handle, Mode mode, Listener* listener) { |
| 377 return scoped_ptr<Channel>( | 377 return scoped_ptr<Channel>( |
| 378 new ChannelNacl(channel_handle, mode, listener)); | 378 new ChannelNacl(channel_handle, mode, listener)); |
| 379 } | 379 } |
| 380 | 380 |
| 381 } // namespace IPC | 381 } // namespace IPC |
| OLD | NEW |