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

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

Issue 380413003: Mojo: Use InterfaceFactory<Interface> for service registration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix network_service_loader 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_connection.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
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 DEVICE_SERIAL_SERIAL_SERVICE_IMPL_H_ 5 #ifndef DEVICE_SERIAL_SERIAL_SERVICE_IMPL_H_
6 #define DEVICE_SERIAL_SERIAL_SERVICE_IMPL_H_ 6 #define DEVICE_SERIAL_SERIAL_SERVICE_IMPL_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "device/serial/serial.mojom.h" 10 #include "device/serial/serial.mojom.h"
(...skipping 18 matching lines...) Expand all
29 scoped_refptr<base::MessageLoopProxy> io_message_loop, 29 scoped_refptr<base::MessageLoopProxy> io_message_loop,
30 mojo::InterfaceRequest<serial::SerialService> request); 30 mojo::InterfaceRequest<serial::SerialService> request);
31 31
32 // mojo::InterfaceImpl<SerialService> overrides. 32 // mojo::InterfaceImpl<SerialService> overrides.
33 virtual void GetDevices(const mojo::Callback< 33 virtual void GetDevices(const mojo::Callback<
34 void(mojo::Array<serial::DeviceInfoPtr>)>& callback) OVERRIDE; 34 void(mojo::Array<serial::DeviceInfoPtr>)>& callback) OVERRIDE;
35 virtual void Connect( 35 virtual void Connect(
36 const mojo::String& path, 36 const mojo::String& path,
37 serial::ConnectionOptionsPtr options, 37 serial::ConnectionOptionsPtr options,
38 mojo::InterfaceRequest<serial::Connection> connection_request) OVERRIDE; 38 mojo::InterfaceRequest<serial::Connection> connection_request) OVERRIDE;
39 virtual void OnConnectionError() OVERRIDE;
40 39
41 private: 40 private:
42 SerialDeviceEnumerator* GetDeviceEnumerator(); 41 SerialDeviceEnumerator* GetDeviceEnumerator();
43 bool IsValidPath(const mojo::String& path); 42 bool IsValidPath(const mojo::String& path);
44 void OnConnected( 43 void OnConnected(
45 const mojo::Callback<void(serial::ConnectionInfoPtr)>& callback, 44 const mojo::Callback<void(serial::ConnectionInfoPtr)>& callback,
46 serial::ConnectionInfoPtr result); 45 serial::ConnectionInfoPtr result);
47 46
48 scoped_ptr<SerialDeviceEnumerator> device_enumerator_; 47 scoped_ptr<SerialDeviceEnumerator> device_enumerator_;
49 scoped_refptr<SerialConnectionFactory> connection_factory_; 48 scoped_refptr<SerialConnectionFactory> connection_factory_;
50 49
51 DISALLOW_COPY_AND_ASSIGN(SerialServiceImpl); 50 DISALLOW_COPY_AND_ASSIGN(SerialServiceImpl);
52 }; 51 };
53 52
54 } // namespace device 53 } // namespace device
55 54
56 #endif // DEVICE_SERIAL_SERIAL_SERVICE_IMPL_H_ 55 #endif // DEVICE_SERIAL_SERIAL_SERVICE_IMPL_H_
OLDNEW
« no previous file with comments | « device/serial/serial_connection.cc ('k') | device/serial/serial_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698