Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: device/serial/serial_connection_factory.cc

Issue 1107013002: [device] Replace MessageLoopProxy usage with ThreadTaskRunnerHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "device/serial/serial_connection_factory.h" 5 #include "device/serial/serial_connection_factory.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "device/serial/serial_connection.h" 9 #include "device/serial/serial_connection.h"
10 #include "device/serial/serial_io_handler.h" 10 #include "device/serial/serial_io_handler.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 mojo::InterfaceRequest<serial::DataSink> sink_; 54 mojo::InterfaceRequest<serial::DataSink> sink_;
55 mojo::InterfaceRequest<serial::DataSource> source_; 55 mojo::InterfaceRequest<serial::DataSource> source_;
56 mojo::InterfacePtr<serial::DataSourceClient> source_client_; 56 mojo::InterfacePtr<serial::DataSourceClient> source_client_;
57 scoped_refptr<SerialIoHandler> io_handler_; 57 scoped_refptr<SerialIoHandler> io_handler_;
58 58
59 DISALLOW_COPY_AND_ASSIGN(ConnectTask); 59 DISALLOW_COPY_AND_ASSIGN(ConnectTask);
60 }; 60 };
61 61
62 SerialConnectionFactory::SerialConnectionFactory( 62 SerialConnectionFactory::SerialConnectionFactory(
63 const IoHandlerFactory& io_handler_factory, 63 const IoHandlerFactory& io_handler_factory,
64 scoped_refptr<base::MessageLoopProxy> connect_message_loop) 64 scoped_refptr<base::SingleThreadTaskRunner> connect_message_loop)
65 : io_handler_factory_(io_handler_factory), 65 : io_handler_factory_(io_handler_factory),
66 connect_message_loop_(connect_message_loop) { 66 connect_message_loop_(connect_message_loop) {
67 } 67 }
68 68
69 void SerialConnectionFactory::CreateConnection( 69 void SerialConnectionFactory::CreateConnection(
70 const std::string& path, 70 const std::string& path,
71 serial::ConnectionOptionsPtr options, 71 serial::ConnectionOptionsPtr options,
72 mojo::InterfaceRequest<serial::Connection> connection_request, 72 mojo::InterfaceRequest<serial::Connection> connection_request,
73 mojo::InterfaceRequest<serial::DataSink> sink, 73 mojo::InterfaceRequest<serial::DataSink> sink,
74 mojo::InterfaceRequest<serial::DataSource> source, 74 mojo::InterfaceRequest<serial::DataSource> source,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 return; 125 return;
126 } 126 }
127 127
128 mojo::BindToRequest( 128 mojo::BindToRequest(
129 new SerialConnection(io_handler_, sink_.Pass(), source_.Pass(), 129 new SerialConnection(io_handler_, sink_.Pass(), source_.Pass(),
130 source_client_.Pass()), 130 source_client_.Pass()),
131 &connection_request_); 131 &connection_request_);
132 } 132 }
133 133
134 } // namespace device 134 } // namespace device
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698