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

Side by Side Diff: device/serial/serial_service_impl.h

Issue 363853003: Add a basic Mojo SerialService that implements GetDevices(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 | « device/serial/serial_device_enumerator_win.cc ('k') | device/serial/serial_service_impl.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 2014 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 DEVICE_SERIAL_SERIAL_SERVICE_IMPL_H_
6 #define DEVICE_SERIAL_SERIAL_SERVICE_IMPL_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop_proxy.h"
10 #include "device/serial/serial.mojom.h"
11 #include "device/serial/serial_device_enumerator.h"
12 #include "mojo/public/cpp/bindings/interface_impl.h"
13
14 namespace device {
15
16 class SerialServiceImpl : public mojo::InterfaceImpl<serial::SerialService> {
17 public:
18 SerialServiceImpl();
19 virtual ~SerialServiceImpl();
20
21 static void Create(mojo::InterfaceRequest<serial::SerialService> request);
22 static void CreateOnMessageLoop(
23 scoped_refptr<base::MessageLoopProxy> message_loop,
24 mojo::InterfaceRequest<serial::SerialService> request);
25
26 // mojo::InterfaceImpl<SerialService> overrides.
27 virtual void GetDevices(const mojo::Callback<
28 void(mojo::Array<serial::DeviceInfoPtr>)>& callback) OVERRIDE;
29 virtual void OnConnectionError() OVERRIDE;
30
31 private:
32 scoped_ptr<SerialDeviceEnumerator> device_enumerator_;
33 };
34
35 } // namespace device
36
37 #endif // DEVICE_SERIAL_SERIAL_SERVICE_IMPL_H_
OLDNEW
« no previous file with comments | « device/serial/serial_device_enumerator_win.cc ('k') | device/serial/serial_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698