| 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 #include "remoting/host/setup/native_messaging_reader.h" | 5 #include "remoting/host/setup/native_messaging_reader.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
| 11 #include "base/location.h" | 11 #include "base/location.h" |
| 12 #include "base/sequenced_task_runner.h" |
| 12 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
| 13 #include "base/stl_util.h" | 14 #include "base/stl_util.h" |
| 14 #include "base/task/sequenced_task_runner.h" | |
| 15 #include "base/thread_task_runner_handle.h" | 15 #include "base/thread_task_runner_handle.h" |
| 16 #include "base/threading/sequenced_worker_pool.h" | 16 #include "base/threading/sequenced_worker_pool.h" |
| 17 #include "base/values.h" | 17 #include "base/values.h" |
| 18 #include "net/base/file_stream.h" | 18 #include "net/base/file_stream.h" |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 // uint32 is specified in the protocol as the type for the message header. | 22 // uint32 is specified in the protocol as the type for the message header. |
| 23 typedef uint32 MessageLengthType; | 23 typedef uint32 MessageLengthType; |
| 24 | 24 |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 void NativeMessagingReader::InvokeMessageCallback( | 155 void NativeMessagingReader::InvokeMessageCallback( |
| 156 scoped_ptr<base::Value> message) { | 156 scoped_ptr<base::Value> message) { |
| 157 message_callback_.Run(message.Pass()); | 157 message_callback_.Run(message.Pass()); |
| 158 } | 158 } |
| 159 | 159 |
| 160 void NativeMessagingReader::InvokeEofCallback() { | 160 void NativeMessagingReader::InvokeEofCallback() { |
| 161 eof_callback_.Run(); | 161 eof_callback_.Run(); |
| 162 } | 162 } |
| 163 | 163 |
| 164 } // namespace remoting | 164 } // namespace remoting |
| OLD | NEW |