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

Side by Side Diff: chromeos/dbus/services/cros_dbus_service.h

Issue 2798703002: Create org.chromium.KioskAppService. (Closed)
Patch Set: style nits Created 3 years, 8 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
« no previous file with comments | « chromeos/BUILD.gn ('k') | chromeos/dbus/services/cros_dbus_service.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 (c) 2012 The Chromium Authors. All rights reserved. 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 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 CHROMEOS_DBUS_SERVICES_CROS_DBUS_SERVICE_H_ 5 #ifndef CHROMEOS_DBUS_SERVICES_CROS_DBUS_SERVICE_H_
6 #define CHROMEOS_DBUS_SERVICES_CROS_DBUS_SERVICE_H_ 6 #define CHROMEOS_DBUS_SERVICES_CROS_DBUS_SERVICE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 std::vector<std::unique_ptr<ServiceProviderInterface>>; 42 std::vector<std::unique_ptr<ServiceProviderInterface>>;
43 43
44 // Creates, starts, and returns a new instance owning |service_name| and 44 // Creates, starts, and returns a new instance owning |service_name| and
45 // exporting |service_providers|'s methods on |object_path|. Static so a stub 45 // exporting |service_providers|'s methods on |object_path|. Static so a stub
46 // implementation can be used when not running on a device. 46 // implementation can be used when not running on a device.
47 static std::unique_ptr<CrosDBusService> Create( 47 static std::unique_ptr<CrosDBusService> Create(
48 const std::string& service_name, 48 const std::string& service_name,
49 const dbus::ObjectPath& object_path, 49 const dbus::ObjectPath& object_path,
50 ServiceProviderList service_providers); 50 ServiceProviderList service_providers);
51 51
52 // Creates a ServiceProviderList containing a single provider.
53 static ServiceProviderList CreateServiceProviderList(
54 std::unique_ptr<ServiceProviderInterface> provider);
55
52 virtual ~CrosDBusService(); 56 virtual ~CrosDBusService();
53 57
54 protected: 58 protected:
55 CrosDBusService(); 59 CrosDBusService();
56 60
57 private: 61 private:
58 friend class CrosDBusServiceTest; 62 friend class CrosDBusServiceTest;
59 63
60 // Creates, starts, and returns a real implementation of CrosDBusService that 64 // Creates, starts, and returns a real implementation of CrosDBusService that
61 // uses |bus|. Called by Create(), but can also be called directly by tests 65 // uses |bus|. Called by Create(), but can also be called directly by tests
62 // that need a non-stub implementation even when not running on a device. 66 // that need a non-stub implementation even when not running on a device.
63 static std::unique_ptr<CrosDBusService> CreateRealImpl( 67 static std::unique_ptr<CrosDBusService> CreateRealImpl(
64 dbus::Bus* bus, 68 dbus::Bus* bus,
65 const std::string& service_name, 69 const std::string& service_name,
66 const dbus::ObjectPath& object_path, 70 const dbus::ObjectPath& object_path,
67 ServiceProviderList service_providers); 71 ServiceProviderList service_providers);
68 72
69 DISALLOW_COPY_AND_ASSIGN(CrosDBusService); 73 DISALLOW_COPY_AND_ASSIGN(CrosDBusService);
70 }; 74 };
71 75
72 } // namespace chromeos 76 } // namespace chromeos
73 77
74 #endif // CHROMEOS_DBUS_SERVICES_CROS_DBUS_SERVICE_H_ 78 #endif // CHROMEOS_DBUS_SERVICES_CROS_DBUS_SERVICE_H_
OLDNEW
« no previous file with comments | « chromeos/BUILD.gn ('k') | chromeos/dbus/services/cros_dbus_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698