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

Side by Side Diff: chrome/browser/extensions/api/serial/serial_connection.h

Issue 10827123: Add serial bulk reads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge help. Created 8 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_EXTENSIONS_API_SERIAL_SERIAL_CONNECTION_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SERIAL_SERIAL_CONNECTION_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_SERIAL_SERIAL_CONNECTION_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_SERIAL_SERIAL_CONNECTION_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 18 matching lines...) Expand all
29 public: 29 public:
30 SerialConnection(const std::string& port, 30 SerialConnection(const std::string& port,
31 int bitrate, 31 int bitrate,
32 ApiResourceEventNotifier* event_notifier); 32 ApiResourceEventNotifier* event_notifier);
33 virtual ~SerialConnection(); 33 virtual ~SerialConnection();
34 34
35 virtual bool Open(); 35 virtual bool Open();
36 virtual void Close(); 36 virtual void Close();
37 virtual void Flush(); 37 virtual void Flush();
38 38
39 virtual int Read(uint8* byte); 39 virtual int Read(scoped_refptr<net::IOBufferWithSize> io_buffer);
40 virtual int Write(scoped_refptr<net::IOBuffer> io_buffer, int byte_count); 40 virtual int Write(scoped_refptr<net::IOBuffer> io_buffer, int byte_count);
41 41
42 struct ControlSignals { 42 struct ControlSignals {
43 // Sent from workstation to device. The should_set_ values indicate whether 43 // Sent from workstation to device. The should_set_ values indicate whether
44 // SetControlSignals should change the given signal (true) or else leave it 44 // SetControlSignals should change the given signal (true) or else leave it
45 // as-is (false). 45 // as-is (false).
46 bool should_set_dtr; 46 bool should_set_dtr;
47 bool dtr; 47 bool dtr;
48 bool should_set_rts; 48 bool should_set_rts;
49 bool rts; 49 bool rts;
(...skipping 13 matching lines...) Expand all
63 63
64 private: 64 private:
65 std::string port_; 65 std::string port_;
66 int bitrate_; 66 int bitrate_;
67 base::PlatformFile file_; 67 base::PlatformFile file_;
68 }; 68 };
69 69
70 } // namespace extensions 70 } // namespace extensions
71 71
72 #endif // CHROME_BROWSER_EXTENSIONS_API_SERIAL_SERIAL_CONNECTION_H_ 72 #endif // CHROME_BROWSER_EXTENSIONS_API_SERIAL_SERIAL_CONNECTION_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/serial/serial_apitest.cc ('k') | chrome/browser/extensions/api/serial/serial_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698