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 #include "ipc/mojo/ipc_message_pipe_reader.h" | 5 #include "ipc/ipc_message_pipe_reader.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
13 #include "base/location.h" | 13 #include "base/location.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/single_thread_task_runner.h" | 16 #include "base/single_thread_task_runner.h" |
17 #include "base/threading/thread_task_runner_handle.h" | 17 #include "base/threading/thread_task_runner_handle.h" |
18 #include "ipc/mojo/ipc_channel_mojo.h" | 18 #include "ipc/ipc_channel_mojo.h" |
19 #include "mojo/public/cpp/bindings/message.h" | 19 #include "mojo/public/cpp/bindings/message.h" |
20 | 20 |
21 namespace IPC { | 21 namespace IPC { |
22 namespace internal { | 22 namespace internal { |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 // Used by Send() to capture a serialized Channel::Receive message. | 26 // Used by Send() to capture a serialized Channel::Receive message. |
27 class MessageSerializer : public mojo::MessageReceiverWithResponder { | 27 class MessageSerializer : public mojo::MessageReceiverWithResponder { |
28 public: | 28 public: |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 | 147 |
148 void MessagePipeReader::DelayedDeleter::operator()( | 148 void MessagePipeReader::DelayedDeleter::operator()( |
149 MessagePipeReader* ptr) const { | 149 MessagePipeReader* ptr) const { |
150 ptr->Close(); | 150 ptr->Close(); |
151 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, | 151 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, |
152 base::Bind(&DeleteNow, ptr)); | 152 base::Bind(&DeleteNow, ptr)); |
153 } | 153 } |
154 | 154 |
155 } // namespace internal | 155 } // namespace internal |
156 } // namespace IPC | 156 } // namespace IPC |
OLD | NEW |