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

Side by Side Diff: services/video_capture/video_capture_service.cc

Issue 2476063002: Service Manager: Rework Service and ServiceContext lifetime (Closed)
Patch Set: . Created 4 years, 1 month 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 #include "services/video_capture/video_capture_service.h" 5 #include "services/video_capture/video_capture_service.h"
6 6
7 #include "media/capture/video/fake_video_capture_device.h" 7 #include "media/capture/video/fake_video_capture_device.h"
8 #include "media/capture/video/video_capture_jpeg_decoder.h" 8 #include "media/capture/video/video_capture_jpeg_decoder.h"
9 #include "services/service_manager/public/cpp/interface_registry.h"
9 #include "services/video_capture/video_capture_device_factory_impl.h" 10 #include "services/video_capture/video_capture_device_factory_impl.h"
10 11
11 namespace { 12 namespace {
12 static const char kFakeDeviceDisplayName[] = "Fake Video Capture Device"; 13 static const char kFakeDeviceDisplayName[] = "Fake Video Capture Device";
13 static const char kFakeDeviceId[] = "FakeDeviceId"; 14 static const char kFakeDeviceId[] = "FakeDeviceId";
14 static const char kFakeModelId[] = "FakeModelId"; 15 static const char kFakeModelId[] = "FakeModelId";
15 static const float kFakeCaptureDefaultFrameRate = 20.0f; 16 static const float kFakeCaptureDefaultFrameRate = 20.0f;
16 17
17 // TODO(chfremer): Replace with an actual decoder factory. 18 // TODO(chfremer): Replace with an actual decoder factory.
18 // https://crbug.com/584797 19 // https://crbug.com/584797
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 } 98 }
98 99
99 void VideoCaptureService::LazyInitializeMockDeviceFactory() { 100 void VideoCaptureService::LazyInitializeMockDeviceFactory() {
100 if (mock_device_factory_) 101 if (mock_device_factory_)
101 return; 102 return;
102 mock_device_factory_ = base::MakeUnique<VideoCaptureDeviceFactoryImpl>( 103 mock_device_factory_ = base::MakeUnique<VideoCaptureDeviceFactoryImpl>(
103 base::Bind(CreateJpegDecoder)); 104 base::Bind(CreateJpegDecoder));
104 } 105 }
105 106
106 } // namespace video_capture 107 } // namespace video_capture
OLDNEW
« no previous file with comments | « services/video_capture/video_capture_service.h ('k') | ui/views/mus/views_aura_mus_test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698