OLD | NEW |
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 EXTENSIONS_BROWSER_API_SERIAL_SERIAL_CONNECTION_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_SERIAL_SERIAL_CONNECTION_H_ |
6 #define EXTENSIONS_BROWSER_API_SERIAL_SERIAL_CONNECTION_H_ | 6 #define EXTENSIONS_BROWSER_API_SERIAL_SERIAL_CONNECTION_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 // partially before being interrupted by an error condition. | 42 // partially before being interrupted by an error condition. |
43 typedef base::Callback< | 43 typedef base::Callback< |
44 void(int bytes_sent, core_api::serial::SendError error)> | 44 void(int bytes_sent, core_api::serial::SendError error)> |
45 SendCompleteCallback; | 45 SendCompleteCallback; |
46 | 46 |
47 SerialConnection(const std::string& port, | 47 SerialConnection(const std::string& port, |
48 const std::string& owner_extension_id); | 48 const std::string& owner_extension_id); |
49 virtual ~SerialConnection(); | 49 virtual ~SerialConnection(); |
50 | 50 |
51 // ApiResource override. | 51 // ApiResource override. |
52 virtual bool IsPersistent() const OVERRIDE; | 52 virtual bool IsPersistent() const override; |
53 | 53 |
54 void set_persistent(bool persistent) { persistent_ = persistent; } | 54 void set_persistent(bool persistent) { persistent_ = persistent; } |
55 bool persistent() const { return persistent_; } | 55 bool persistent() const { return persistent_; } |
56 | 56 |
57 void set_name(const std::string& name) { name_ = name; } | 57 void set_name(const std::string& name) { name_ = name; } |
58 const std::string& name() const { return name_; } | 58 const std::string& name() const { return name_; } |
59 | 59 |
60 void set_buffer_size(int buffer_size); | 60 void set_buffer_size(int buffer_size); |
61 int buffer_size() const { return buffer_size_; } | 61 int buffer_size() const { return buffer_size_; } |
62 | 62 |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 template <> | 205 template <> |
206 struct TypeConverter<device::serial::ConnectionOptionsPtr, | 206 struct TypeConverter<device::serial::ConnectionOptionsPtr, |
207 extensions::core_api::serial::ConnectionOptions> { | 207 extensions::core_api::serial::ConnectionOptions> { |
208 static device::serial::ConnectionOptionsPtr Convert( | 208 static device::serial::ConnectionOptionsPtr Convert( |
209 const extensions::core_api::serial::ConnectionOptions& input); | 209 const extensions::core_api::serial::ConnectionOptions& input); |
210 }; | 210 }; |
211 | 211 |
212 } // namespace mojo | 212 } // namespace mojo |
213 | 213 |
214 #endif // EXTENSIONS_BROWSER_API_SERIAL_SERIAL_CONNECTION_H_ | 214 #endif // EXTENSIONS_BROWSER_API_SERIAL_SERIAL_CONNECTION_H_ |
OLD | NEW |