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

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

Issue 2410743002: Remove the mojo serial interfaces and related infrastructure. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « device/serial/serial_connection.cc ('k') | device/serial/serial_connection_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef DEVICE_SERIAL_SERIAL_CONNECTION_FACTORY_H_
6 #define DEVICE_SERIAL_SERIAL_CONNECTION_FACTORY_H_
7
8 #include <string>
9
10 #include "base/callback.h"
11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h"
13 #include "base/single_thread_task_runner.h"
14 #include "base/threading/thread_task_runner_handle.h"
15 #include "device/serial/data_stream.mojom.h"
16 #include "device/serial/serial.mojom.h"
17 #include "mojo/public/cpp/bindings/interface_request.h"
18
19 namespace device {
20
21 class SerialIoHandler;
22
23 class SerialConnectionFactory
24 : public base::RefCountedThreadSafe<SerialConnectionFactory> {
25 public:
26 typedef base::Callback<scoped_refptr<SerialIoHandler>()> IoHandlerFactory;
27
28 SerialConnectionFactory(
29 const IoHandlerFactory& io_handler_factory,
30 scoped_refptr<base::SingleThreadTaskRunner> connect_task_runner);
31
32 void CreateConnection(
33 const std::string& path,
34 serial::ConnectionOptionsPtr options,
35 mojo::InterfaceRequest<serial::Connection> connection_request,
36 mojo::InterfaceRequest<serial::DataSink> sink,
37 mojo::InterfaceRequest<serial::DataSource> source,
38 mojo::InterfacePtr<serial::DataSourceClient> source_client);
39
40 private:
41 friend class base::RefCountedThreadSafe<SerialConnectionFactory>;
42 class ConnectTask;
43
44 virtual ~SerialConnectionFactory();
45
46 const IoHandlerFactory io_handler_factory_;
47 scoped_refptr<base::SingleThreadTaskRunner> connect_task_runner_;
48
49 DISALLOW_COPY_AND_ASSIGN(SerialConnectionFactory);
50 };
51
52 } // namespace device
53
54 #endif // DEVICE_SERIAL_SERIAL_CONNECTION_FACTORY_H_
OLDNEW
« no previous file with comments | « device/serial/serial_connection.cc ('k') | device/serial/serial_connection_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698