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

Unified Diff: device/serial/data_source_sender.h

Issue 889283002: Remove Client= from device/serial/data_stream.mojom. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: This time without racing message pipes Created 5 years, 10 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/data_sink_unittest.cc ('k') | device/serial/data_source_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/serial/data_source_sender.h
diff --git a/device/serial/data_source_sender.h b/device/serial/data_source_sender.h
index 3a90240fba844059e6d948f952adc186ddba4972..a8c2c634712e9a9a35e5f3ee23d95e1ee883da4d 100644
--- a/device/serial/data_source_sender.h
+++ b/device/serial/data_source_sender.h
@@ -19,7 +19,8 @@ namespace device {
// A DataSourceSender is an interface between a source of data and a
// DataSourceClient.
class DataSourceSender : public base::RefCounted<DataSourceSender>,
- public mojo::InterfaceImpl<serial::DataSource> {
+ public serial::DataSource,
+ public mojo::ErrorHandler {
public:
typedef base::Callback<void(scoped_ptr<WritableBuffer>)> ReadyCallback;
typedef base::Callback<void()> ErrorCallback;
@@ -29,7 +30,9 @@ class DataSourceSender : public base::RefCounted<DataSourceSender>,
// |ready_callback| will not be called again until the previous WritableBuffer
// is destroyed. If a connection error occurs, |error_callback| will be
// called and the DataSourceSender will act as if ShutDown() had been called.
- DataSourceSender(const ReadyCallback& ready_callback,
+ DataSourceSender(mojo::InterfaceRequest<serial::DataSource> source,
+ mojo::InterfacePtr<serial::DataSourceClient> client,
+ const ReadyCallback& ready_callback,
const ErrorCallback& error_callback);
// Shuts down this DataSourceSender. After shut down, |ready_callback| and
@@ -65,6 +68,9 @@ class DataSourceSender : public base::RefCounted<DataSourceSender>,
// Reports a fatal error to the client and shuts down.
void DispatchFatalError();
+ mojo::Binding<serial::DataSource> binding_;
+ mojo::InterfacePtr<serial::DataSourceClient> client_;
+
// The callback to call when the client is ready for more data.
ReadyCallback ready_callback_;
« no previous file with comments | « device/serial/data_sink_unittest.cc ('k') | device/serial/data_source_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698