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

Unified Diff: device/serial/serial_io_handler.h

Issue 401563002: Add a partial Mojo serial connection interface and implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/serial/serial_connection_unittest.cc ('k') | device/serial/serial_io_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/serial/serial_io_handler.h
diff --git a/device/serial/serial_io_handler.h b/device/serial/serial_io_handler.h
index a7cad74c041d67ab44ba3a1b5ac77a40b3c39048..f3f3a5d0ae0b36211aa40b8d73762021c56262fb 100644
--- a/device/serial/serial_io_handler.h
+++ b/device/serial/serial_io_handler.h
@@ -23,7 +23,8 @@ class SerialIoHandler : public base::NonThreadSafe,
public base::RefCounted<SerialIoHandler> {
public:
// Constructs an instance of some platform-specific subclass.
- static scoped_refptr<SerialIoHandler> Create();
+ static scoped_refptr<SerialIoHandler> Create(
+ scoped_refptr<base::MessageLoopProxy> file_thread_message_loop);
typedef base::Callback<void(bool success)> OpenCompleteCallback;
@@ -39,10 +40,8 @@ class SerialIoHandler : public base::NonThreadSafe,
// Initializes the handler on the current message loop. Must be called exactly
// once before performing any I/O through the handler.
- virtual void Initialize(
- const ReadCompleteCallback& read_callback,
- const WriteCompleteCallback& write_callback,
- scoped_refptr<base::MessageLoopProxy> file_thread_message_loop);
+ virtual void Initialize(const ReadCompleteCallback& read_callback,
+ const WriteCompleteCallback& write_callback);
// Initiates an asynchronous Open of the device.
virtual void Open(const std::string& port,
@@ -94,7 +93,8 @@ class SerialIoHandler : public base::NonThreadSafe,
virtual serial::ConnectionInfoPtr GetPortInfo() const = 0;
protected:
- SerialIoHandler();
+ explicit SerialIoHandler(
+ scoped_refptr<base::MessageLoopProxy> file_thread_message_loop);
virtual ~SerialIoHandler();
// Performs a platform-specific read operation. This must guarantee that
« no previous file with comments | « device/serial/serial_connection_unittest.cc ('k') | device/serial/serial_io_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698