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

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

Issue 2857303002: [Mojo Video Capture] Implement a VideoCaptureProvider using the Mojo service (part 2) (Closed)
Patch Set: Added back update to |state_| which was accidentally dropped in PatchSet 3 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/service.h" 12 #include "services/service_manager/public/cpp/service.h"
13 #include "services/service_manager/public/cpp/service_context_ref.h" 13 #include "services/service_manager/public/cpp/service_context_ref.h"
14 #include "services/video_capture/public/interfaces/device_factory_provider.mojom .h" 14 #include "services/video_capture/public/interfaces/device_factory_provider.mojom .h"
15 15
16 namespace video_capture { 16 namespace video_capture {
17 17
18 class ServiceImpl : public service_manager::Service { 18 class ServiceImpl : public service_manager::Service {
19 public: 19 public:
20 ServiceImpl(); 20 ServiceImpl();
21 ~ServiceImpl() override; 21 ~ServiceImpl() override;
22 22
23 // service_manager::Service: 23 // service_manager::Service implementation.
24 void OnStart() override; 24 void OnStart() override;
25 void OnBindInterface(const service_manager::BindSourceInfo& source_info, 25 void OnBindInterface(const service_manager::BindSourceInfo& source_info,
26 const std::string& interface_name, 26 const std::string& interface_name,
27 mojo::ScopedMessagePipeHandle interface_pipe) override; 27 mojo::ScopedMessagePipeHandle interface_pipe) override;
28 bool OnServiceManagerConnectionLost() override; 28 bool OnServiceManagerConnectionLost() override;
29 29
30 private: 30 private:
31 void OnDeviceFactoryProviderRequest( 31 void OnDeviceFactoryProviderRequest(
32 const service_manager::BindSourceInfo& source_info, 32 const service_manager::BindSourceInfo& source_info,
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 | « content/browser/renderer_host/media/service_video_capture_provider.cc ('k') | services/video_capture/service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698