Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
|
mcasas
2017/04/26 22:12:31
s/2016/2017/
chfremer
2017/04/26 23:33:36
Done.
| |
| 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 SERVICES_VIDEO_CAPTURE_SERVICE_MANAGER_SERVICE_IMPL_H_ | |
| 6 #define SERVICES_VIDEO_CAPTURE_SERVICE_MANAGER_SERVICE_IMPL_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 | |
| 10 #include "mojo/public/cpp/bindings/binding_set.h" | |
| 11 #include "services/service_manager/public/cpp/binder_registry.h" | |
| 12 #include "services/service_manager/public/cpp/interface_factory.h" | |
| 13 #include "services/service_manager/public/cpp/service.h" | |
| 14 #include "services/service_manager/public/cpp/service_context_ref.h" | |
| 15 #include "services/video_capture/public/interfaces/service.mojom.h" | |
| 16 | |
| 17 namespace video_capture { | |
| 18 | |
| 19 class ServiceManagerServiceImpl : public service_manager::Service { | |
|
Ken Rockot(use gerrit already)
2017/04/26 19:40:19
nit: Hmm, is this rename really necessary?
chfremer
2017/04/26 20:01:54
Hmm, not absolutely necessary, but I feel it is us
mcasas
2017/04/26 22:12:31
namespace disambiguates, right?
video_capture::Ser
chfremer
2017/04/26 23:33:36
Yes, to me too, but unfortunately both classes liv
| |
| 20 public: | |
| 21 ServiceManagerServiceImpl(); | |
| 22 ~ServiceManagerServiceImpl() override; | |
| 23 | |
| 24 // service_manager::Service: | |
|
mcasas
2017/04/26 22:12:31
// service_manager::Service implementation.
chfremer
2017/04/26 23:33:36
Done.
| |
| 25 void OnStart() override; | |
| 26 void OnBindInterface(const service_manager::ServiceInfo& source_info, | |
| 27 const std::string& interface_name, | |
| 28 mojo::ScopedMessagePipeHandle interface_pipe) override; | |
| 29 bool OnServiceManagerConnectionLost() override; | |
| 30 | |
| 31 private: | |
| 32 void OnVideoCaptureServiceRequest(mojom::ServiceRequest request); | |
| 33 void SetShutdownDelayInSeconds(float seconds); | |
| 34 void MaybeRequestQuitDelayed(); | |
| 35 void MaybeRequestQuit(); | |
| 36 | |
| 37 float shutdown_delay_in_seconds_; | |
| 38 service_manager::BinderRegistry registry_; | |
| 39 std::unique_ptr<service_manager::ServiceContextRefFactory> ref_factory_; | |
| 40 base::WeakPtrFactory<ServiceManagerServiceImpl> weak_factory_; | |
| 41 | |
| 42 DISALLOW_COPY_AND_ASSIGN(ServiceManagerServiceImpl); | |
| 43 }; | |
| 44 | |
| 45 } // namespace video_capture | |
| 46 | |
| 47 #endif // SERVICES_VIDEO_CAPTURE_SERVICE_MANAGER_SERVICE_IMPL_H_ | |
| OLD | NEW |