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

Side by Side Diff: services/video_capture/service_impl.h

Issue 2850743004: Replace ServiceInfo with BindSourceInfo. (Closed)
Patch Set: . Created 3 years, 7 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 SERVICES_VIDEO_CAPTURE_SERVICE_IMPL_H_ 5 #ifndef SERVICES_VIDEO_CAPTURE_SERVICE_IMPL_H_
6 #define SERVICES_VIDEO_CAPTURE_SERVICE_IMPL_H_ 6 #define SERVICES_VIDEO_CAPTURE_SERVICE_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "mojo/public/cpp/bindings/binding_set.h" 10 #include "mojo/public/cpp/bindings/binding_set.h"
11 #include "services/service_manager/public/cpp/binder_registry.h" 11 #include "services/service_manager/public/cpp/binder_registry.h"
12 #include "services/service_manager/public/cpp/interface_factory.h" 12 #include "services/service_manager/public/cpp/interface_factory.h"
13 #include "services/service_manager/public/cpp/service.h" 13 #include "services/service_manager/public/cpp/service.h"
14 #include "services/service_manager/public/cpp/service_context_ref.h" 14 #include "services/service_manager/public/cpp/service_context_ref.h"
15 #include "services/video_capture/public/interfaces/device_factory_provider.mojom .h" 15 #include "services/video_capture/public/interfaces/device_factory_provider.mojom .h"
16 16
17 namespace video_capture { 17 namespace video_capture {
18 18
19 class ServiceImpl : public service_manager::Service { 19 class ServiceImpl : public service_manager::Service {
20 public: 20 public:
21 ServiceImpl(); 21 ServiceImpl();
22 ~ServiceImpl() override; 22 ~ServiceImpl() override;
23 23
24 // service_manager::Service implementation. 24 // service_manager::Service implementation.
25 void OnStart() override; 25 void OnStart() override;
26 void OnBindInterface(const service_manager::ServiceInfo& source_info, 26 void OnBindInterface(const service_manager::BindSourceInfo& source_info,
27 const std::string& interface_name, 27 const std::string& interface_name,
28 mojo::ScopedMessagePipeHandle interface_pipe) override; 28 mojo::ScopedMessagePipeHandle interface_pipe) override;
29 bool OnServiceManagerConnectionLost() override; 29 bool OnServiceManagerConnectionLost() override;
30 30
31 private: 31 private:
32 void OnDeviceFactoryProviderRequest( 32 void OnDeviceFactoryProviderRequest(
33 mojom::DeviceFactoryProviderRequest request); 33 mojom::DeviceFactoryProviderRequest request);
34 void SetShutdownDelayInSeconds(float seconds); 34 void SetShutdownDelayInSeconds(float seconds);
35 void MaybeRequestQuitDelayed(); 35 void MaybeRequestQuitDelayed();
36 void MaybeRequestQuit(); 36 void MaybeRequestQuit();
37 37
38 float shutdown_delay_in_seconds_; 38 float shutdown_delay_in_seconds_;
39 service_manager::BinderRegistry registry_; 39 service_manager::BinderRegistry registry_;
40 std::unique_ptr<service_manager::ServiceContextRefFactory> ref_factory_; 40 std::unique_ptr<service_manager::ServiceContextRefFactory> ref_factory_;
41 base::ThreadChecker thread_checker_; 41 base::ThreadChecker thread_checker_;
42 base::WeakPtrFactory<ServiceImpl> weak_factory_; 42 base::WeakPtrFactory<ServiceImpl> weak_factory_;
43 43
44 DISALLOW_COPY_AND_ASSIGN(ServiceImpl); 44 DISALLOW_COPY_AND_ASSIGN(ServiceImpl);
45 }; 45 };
46 46
47 } // namespace video_capture 47 } // namespace video_capture
48 48
49 #endif // SERVICES_VIDEO_CAPTURE_SERVICE_IMPL_H_ 49 #endif // SERVICES_VIDEO_CAPTURE_SERVICE_IMPL_H_
OLDNEW
« no previous file with comments | « services/video_capture/device_factory_provider_impl.cc ('k') | services/video_capture/service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698