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 "content/browser/image_capture/image_capture_impl.h" | 5 #include "content/browser/image_capture/image_capture_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 std::move(callback)); | 121 std::move(callback)); |
122 } | 122 } |
123 | 123 |
124 } // anonymous namespace | 124 } // anonymous namespace |
125 | 125 |
126 ImageCaptureImpl::ImageCaptureImpl() {} | 126 ImageCaptureImpl::ImageCaptureImpl() {} |
127 | 127 |
128 ImageCaptureImpl::~ImageCaptureImpl() {} | 128 ImageCaptureImpl::~ImageCaptureImpl() {} |
129 | 129 |
130 // static | 130 // static |
131 void ImageCaptureImpl::Create(media::mojom::ImageCaptureRequest request) { | 131 void ImageCaptureImpl::Create( |
| 132 const service_manager::BindSourceInfo& source_info, |
| 133 media::mojom::ImageCaptureRequest request) { |
132 mojo::MakeStrongBinding(base::MakeUnique<ImageCaptureImpl>(), | 134 mojo::MakeStrongBinding(base::MakeUnique<ImageCaptureImpl>(), |
133 std::move(request)); | 135 std::move(request)); |
134 } | 136 } |
135 | 137 |
136 void ImageCaptureImpl::GetCapabilities( | 138 void ImageCaptureImpl::GetCapabilities( |
137 const std::string& source_id, | 139 const std::string& source_id, |
138 const GetCapabilitiesCallback& callback) { | 140 const GetCapabilitiesCallback& callback) { |
139 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 141 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
140 | 142 |
141 media::ScopedResultCallback<GetCapabilitiesCallback> scoped_callback( | 143 media::ScopedResultCallback<GetCapabilitiesCallback> scoped_callback( |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 media::BindToCurrentLoop(base::Bind(&RunFailedTakePhotoCallback))); | 176 media::BindToCurrentLoop(base::Bind(&RunFailedTakePhotoCallback))); |
175 | 177 |
176 BrowserThread::PostTask( | 178 BrowserThread::PostTask( |
177 BrowserThread::IO, FROM_HERE, | 179 BrowserThread::IO, FROM_HERE, |
178 base::Bind(&TakePhotoOnIOThread, source_id, | 180 base::Bind(&TakePhotoOnIOThread, source_id, |
179 BrowserMainLoop::GetInstance()->media_stream_manager(), | 181 BrowserMainLoop::GetInstance()->media_stream_manager(), |
180 base::Passed(&scoped_callback))); | 182 base::Passed(&scoped_callback))); |
181 } | 183 } |
182 | 184 |
183 } // namespace content | 185 } // namespace content |
OLD | NEW |