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

Unified Diff: chrome/browser/extensions/api/serial/serial_api.h

Issue 10702138: Instrument serial API code to make testing easier. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | « no previous file | chrome/browser/extensions/api/serial/serial_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/serial/serial_api.h
diff --git a/chrome/browser/extensions/api/serial/serial_api.h b/chrome/browser/extensions/api/serial/serial_api.h
index 1d31ba652eb1d0282a4a5cb4072c3a784821b447..52ff92824153c8bbf9f140650d060b6c185ea918 100644
--- a/chrome/browser/extensions/api/serial/serial_api.h
+++ b/chrome/browser/extensions/api/serial/serial_api.h
@@ -16,6 +16,7 @@
namespace extensions {
class APIResourceEventNotifier;
+class SerialConnection;
extern const char kConnectionIdKey[];
@@ -49,6 +50,13 @@ class SerialOpenFunction : public AsyncAPIFunction {
virtual void Work() OVERRIDE;
virtual bool Respond() OVERRIDE;
+ // Overrideable for testing.
Mihai Parparita -not on Chrome 2012/07/11 00:45:45 FWIW, the delegate pattern that Antony and I menti
+ virtual SerialConnection* CreateSerialConnection(
+ const std::string& port,
+ int bitrate,
+ APIResourceEventNotifier* event_notifier);
+ virtual bool DoesPortExist(const std::string& port);
+
private:
scoped_ptr<api::experimental_serial::Open::Params> params_;
int src_id_;
« no previous file with comments | « no previous file | chrome/browser/extensions/api/serial/serial_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698