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

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

Issue 369893008: Move the serial API to extensions/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add missing dependency from usb_service to chromeos Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « extensions/browser/api/serial/OWNERS ('k') | extensions/browser/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
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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_API_H_ 5 #ifndef EXTENSIONS_BROWSER_API_SERIAL_SERIAL_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_SERIAL_SERIAL_API_H_ 6 #define EXTENSIONS_BROWSER_API_SERIAL_SERIAL_API_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h"
11 #include "chrome/common/extensions/api/serial.h"
12 #include "device/serial/serial.mojom.h" 10 #include "device/serial/serial.mojom.h"
13 #include "extensions/browser/api/api_resource_manager.h" 11 #include "extensions/browser/api/api_resource_manager.h"
14 #include "extensions/browser/api/async_api_function.h" 12 #include "extensions/browser/api/async_api_function.h"
13 #include "extensions/common/api/serial.h"
15 14
16 namespace extensions { 15 namespace extensions {
17 16
18 class SerialConnection; 17 class SerialConnection;
19 18
20 namespace api { 19 namespace core_api {
21 20
22 class SerialEventDispatcher; 21 class SerialEventDispatcher;
23 22
24 class SerialAsyncApiFunction : public AsyncApiFunction { 23 class SerialAsyncApiFunction : public AsyncApiFunction {
25 public: 24 public:
26 SerialAsyncApiFunction(); 25 SerialAsyncApiFunction();
27 26
28 protected: 27 protected:
29 virtual ~SerialAsyncApiFunction(); 28 virtual ~SerialAsyncApiFunction();
30 29
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 virtual ~SerialSetControlSignalsFunction(); 232 virtual ~SerialSetControlSignalsFunction();
234 233
235 // AsyncApiFunction: 234 // AsyncApiFunction:
236 virtual bool Prepare() OVERRIDE; 235 virtual bool Prepare() OVERRIDE;
237 virtual void Work() OVERRIDE; 236 virtual void Work() OVERRIDE;
238 237
239 private: 238 private:
240 scoped_ptr<serial::SetControlSignals::Params> params_; 239 scoped_ptr<serial::SetControlSignals::Params> params_;
241 }; 240 };
242 241
243 } // namespace api 242 } // namespace core_api
244 243
245 } // namespace extensions 244 } // namespace extensions
246 245
247 namespace mojo { 246 namespace mojo {
248 247
249 template <> 248 template <>
250 class TypeConverter<device::serial::DeviceInfoPtr, 249 class TypeConverter<device::serial::DeviceInfoPtr,
251 linked_ptr<extensions::api::serial::DeviceInfo> > { 250 linked_ptr<extensions::core_api::serial::DeviceInfo> > {
252 public: 251 public:
253 static linked_ptr<extensions::api::serial::DeviceInfo> ConvertTo( 252 static linked_ptr<extensions::core_api::serial::DeviceInfo> ConvertTo(
254 const device::serial::DeviceInfoPtr& input); 253 const device::serial::DeviceInfoPtr& input);
255 }; 254 };
256 255
257 } // namespace mojo 256 } // namespace mojo
258 257
259 #endif // CHROME_BROWSER_EXTENSIONS_API_SERIAL_SERIAL_API_H_ 258 #endif // EXTENSIONS_BROWSER_API_SERIAL_SERIAL_API_H_
OLDNEW
« no previous file with comments | « extensions/browser/api/serial/OWNERS ('k') | extensions/browser/api/serial/serial_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698