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

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

Issue 9174019: Add skeleton plumbing for serial API. No functionality yet. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/serial/serial_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SERIAL_SERIAL_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_SERIAL_SERIAL_API_H_
7 #pragma once
8
9 #include <string>
10
11 #include "chrome/browser/extensions/extension_function.h"
12
13 namespace extensions {
14
15 extern const char kConnectionIdKey[];
16
17 class SerialOpenFunction : public AsyncExtensionFunction {
18 public:
19 SerialOpenFunction();
20 virtual ~SerialOpenFunction();
21
22 virtual bool RunImpl() OVERRIDE;
23
24 protected:
25 void WorkOnIOThread();
26 void RespondOnUIThread();
27
28 private:
29 std::string port_;
30
31 DECLARE_EXTENSION_FUNCTION_NAME("experimental.serial.open")
32 };
33
34 class SerialCloseFunction : public AsyncExtensionFunction {
35 public:
36 SerialCloseFunction();
37 virtual ~SerialCloseFunction();
38
39 virtual bool RunImpl() OVERRIDE;
40
41 protected:
42 void WorkOnIOThread();
43 void RespondOnUIThread();
44
45 private:
46 int connection_id_;
47
48 DECLARE_EXTENSION_FUNCTION_NAME("experimental.serial.close")
49 };
50
51 } // namespace extensions
52
53 #endif // CHROME_BROWSER_EXTENSIONS_API_SERIAL_SERIAL_API_H_
OLDNEW
« 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