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

Side by Side Diff: content/browser/media/capture/image_capture_impl.cc

Issue 1926873002: MediaStream Image Capture (3): Adding mojo and browser impl for dummy takePhoto(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: const auto& Created 4 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "content/browser/media/capture/image_capture_impl.h"
6
7 #include "base/bind_helpers.h"
8 #include "content/public/browser/browser_thread.h"
9
10 namespace content {
11
12 // static
13 void ImageCaptureImpl::Create(
14 mojo::InterfaceRequest<blink::mojom::ImageCapture> request) {
15 // |binding_| will take ownership of ImageCaptureImpl.
16 new ImageCaptureImpl(std::move(request));
17 }
18
19 ImageCaptureImpl::~ImageCaptureImpl() {}
20
21 void ImageCaptureImpl::TakePhoto(const mojo::String& /* source_id */,
22 const TakePhotoCallback& callback) {
23 DCHECK_CURRENTLY_ON(BrowserThread::UI);
24
25 // TODO(mcasas): Implement this feature., https://crbug.com/518807.
26 mojo::Array<uint8_t> data(1);
27 callback.Run("text/plain", std::move(data));
28 }
29
30 ImageCaptureImpl::ImageCaptureImpl(
31 mojo::InterfaceRequest<blink::mojom::ImageCapture> request)
32 : binding_(this, std::move(request)) {}
33
34 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/capture/image_capture_impl.h ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698