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

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

Issue 2080513002: Deletes mojo::Callback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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/battery/battery_monitor_impl.cc ('k') | device/serial/data_sink_receiver.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef DEVICE_SERIAL_DATA_SINK_RECEIVER_H_ 5 #ifndef DEVICE_SERIAL_DATA_SINK_RECEIVER_H_
6 #define DEVICE_SERIAL_DATA_SINK_RECEIVER_H_ 6 #define DEVICE_SERIAL_DATA_SINK_RECEIVER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // |cancel_callback| and |error_callback| will never be called. 45 // |cancel_callback| and |error_callback| will never be called.
46 void ShutDown(); 46 void ShutDown();
47 47
48 private: 48 private:
49 class Buffer; 49 class Buffer;
50 class DataFrame; 50 class DataFrame;
51 friend class base::RefCounted<DataSinkReceiver>; 51 friend class base::RefCounted<DataSinkReceiver>;
52 52
53 ~DataSinkReceiver() override; 53 ~DataSinkReceiver() override;
54 54
55 // mojo::InterfaceImpl<serial::DataSink> overrides. 55 // serial::DataSink overrides.
56 void Cancel(int32_t error) override; 56 void Cancel(int32_t error) override;
57 void OnData(mojo::Array<uint8_t> data, 57 void OnData(mojo::Array<uint8_t> data,
58 const mojo::Callback<void(uint32_t, int32_t)>& callback) override; 58 const OnDataCallback& callback) override;
59 void ClearError() override; 59 void ClearError() override;
60 60
61 void OnConnectionError(); 61 void OnConnectionError();
62 62
63 // Dispatches data to |ready_callback_|. 63 // Dispatches data to |ready_callback_|.
64 void RunReadyCallback(); 64 void RunReadyCallback();
65 65
66 // Reports a successful read of |bytes_read|. 66 // Reports a successful read of |bytes_read|.
67 void Done(uint32_t bytes_read); 67 void Done(uint32_t bytes_read);
68 68
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 bool shut_down_; 105 bool shut_down_;
106 106
107 base::WeakPtrFactory<DataSinkReceiver> weak_factory_; 107 base::WeakPtrFactory<DataSinkReceiver> weak_factory_;
108 108
109 DISALLOW_COPY_AND_ASSIGN(DataSinkReceiver); 109 DISALLOW_COPY_AND_ASSIGN(DataSinkReceiver);
110 }; 110 };
111 111
112 } // namespace device 112 } // namespace device
113 113
114 #endif // DEVICE_SERIAL_DATA_SINK_RECEIVER_H_ 114 #endif // DEVICE_SERIAL_DATA_SINK_RECEIVER_H_
OLDNEW
« no previous file with comments | « device/battery/battery_monitor_impl.cc ('k') | device/serial/data_sink_receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698