Index: device/serial/serial_io_handler.h |
diff --git a/device/serial/serial_io_handler.h b/device/serial/serial_io_handler.h |
index 5f93d63270b0ffcc8f4a31db94d21054a90a1a2c..1b2a8c49d4ac47fd0dca17174c6e9d50da4d23b6 100644 |
--- a/device/serial/serial_io_handler.h |
+++ b/device/serial/serial_io_handler.h |
@@ -8,7 +8,8 @@ |
#include "base/callback.h" |
#include "base/files/file.h" |
#include "base/memory/ref_counted.h" |
-#include "base/message_loop/message_loop_proxy.h" |
+#include "base/single_thread_task_runner.h" |
+#include "base/thread_task_runner_handle.h" |
#include "base/threading/non_thread_safe.h" |
#include "device/serial/buffer.h" |
#include "device/serial/serial.mojom.h" |
@@ -24,8 +25,8 @@ class SerialIoHandler : public base::NonThreadSafe, |
public: |
// Constructs an instance of some platform-specific subclass. |
static scoped_refptr<SerialIoHandler> Create( |
- scoped_refptr<base::MessageLoopProxy> file_thread_message_loop, |
- scoped_refptr<base::MessageLoopProxy> ui_thread_message_loop); |
+ scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner, |
+ scoped_refptr<base::SingleThreadTaskRunner> ui_thread_task_runner); |
typedef base::Callback<void(bool success)> OpenCompleteCallback; |
@@ -84,8 +85,8 @@ class SerialIoHandler : public base::NonThreadSafe, |
protected: |
explicit SerialIoHandler( |
- scoped_refptr<base::MessageLoopProxy> file_thread_message_loop, |
- scoped_refptr<base::MessageLoopProxy> ui_thread_message_loop); |
+ scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner, |
+ scoped_refptr<base::SingleThreadTaskRunner> ui_thread_task_runner); |
virtual ~SerialIoHandler(); |
// Performs a platform-specific read operation. This must guarantee that |
@@ -114,8 +115,8 @@ class SerialIoHandler : public base::NonThreadSafe, |
// Requests access to the underlying serial device, if needed. |
virtual void RequestAccess( |
const std::string& port, |
- scoped_refptr<base::MessageLoopProxy> file_message_loop, |
- scoped_refptr<base::MessageLoopProxy> ui_message_loop); |
+ scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, |
+ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); |
// Performs platform-specific, one-time port configuration on open. |
virtual bool PostOpen(); |
@@ -180,7 +181,7 @@ class SerialIoHandler : public base::NonThreadSafe, |
// Continues an Open operation on the FILE thread. |
void StartOpen(const std::string& port, |
- scoped_refptr<base::MessageLoopProxy> io_message_loop); |
+ scoped_refptr<base::SingleThreadTaskRunner> io_task_runner); |
// Finalizes an Open operation (continued from StartOpen) on the IO thread. |
void FinishOpen(base::File file); |
@@ -208,9 +209,9 @@ class SerialIoHandler : public base::NonThreadSafe, |
// Callback to handle the completion of a pending Open() request. |
OpenCompleteCallback open_complete_; |
- scoped_refptr<base::MessageLoopProxy> file_thread_message_loop_; |
+ scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner_; |
// On Chrome OS, PermissionBrokerClient should be called on the UI thread. |
- scoped_refptr<base::MessageLoopProxy> ui_thread_message_loop_; |
+ scoped_refptr<base::SingleThreadTaskRunner> ui_thread_task_runner_; |
DISALLOW_COPY_AND_ASSIGN(SerialIoHandler); |
}; |