| OLD | NEW |
| 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 #include "services/video_capture/service_impl.h" | 5 #include "services/video_capture/service_impl.h" |
| 6 | 6 |
| 7 #include "mojo/public/cpp/bindings/strong_binding.h" | 7 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 8 #include "services/service_manager/public/cpp/interface_registry.h" | |
| 9 #include "services/service_manager/public/cpp/service_context.h" | 8 #include "services/service_manager/public/cpp/service_context.h" |
| 10 #include "services/video_capture/device_factory_provider_impl.h" | 9 #include "services/video_capture/device_factory_provider_impl.h" |
| 11 #include "services/video_capture/public/interfaces/constants.mojom.h" | 10 #include "services/video_capture/public/interfaces/constants.mojom.h" |
| 12 | 11 |
| 13 namespace video_capture { | 12 namespace video_capture { |
| 14 | 13 |
| 15 ServiceImpl::ServiceImpl() | 14 ServiceImpl::ServiceImpl() |
| 16 : shutdown_delay_in_seconds_(mojom::kDefaultShutdownDelayInSeconds), | 15 : shutdown_delay_in_seconds_(mojom::kDefaultShutdownDelayInSeconds), |
| 17 weak_factory_(this) {} | 16 weak_factory_(this) {} |
| 18 | 17 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 | 73 |
| 75 void ServiceImpl::MaybeRequestQuit() { | 74 void ServiceImpl::MaybeRequestQuit() { |
| 76 DCHECK(thread_checker_.CalledOnValidThread()); | 75 DCHECK(thread_checker_.CalledOnValidThread()); |
| 77 DCHECK(ref_factory_); | 76 DCHECK(ref_factory_); |
| 78 if (ref_factory_->HasNoRefs()) { | 77 if (ref_factory_->HasNoRefs()) { |
| 79 context()->RequestQuit(); | 78 context()->RequestQuit(); |
| 80 } | 79 } |
| 81 } | 80 } |
| 82 | 81 |
| 83 } // namespace video_capture | 82 } // namespace video_capture |
| OLD | NEW |