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

Side by Side Diff: third_party/WebKit/Source/modules/imagecapture/PhotoCapabilities.cpp

Issue 2164473002: ImageCapture: wire PhotoCapabilities' ISO, width, height and PhotoSettings' width and height (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dcheng@ comments Created 4 years, 5 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 #include "modules/imagecapture/PhotoCapabilities.h" 5 #include "modules/imagecapture/PhotoCapabilities.h"
6 6
7 namespace blink { 7 namespace blink {
8 8
9 // static 9 // static
10 PhotoCapabilities* PhotoCapabilities::create() 10 PhotoCapabilities* PhotoCapabilities::create()
11 { 11 {
12 return new PhotoCapabilities(); 12 return new PhotoCapabilities();
13 } 13 }
14 14
15 MediaSettingsRange* PhotoCapabilities::zoom() const { return m_zoom; }
16
17 void PhotoCapabilities::setZoom(MediaSettingsRange* value) { m_zoom = value; }
18
19 String PhotoCapabilities::focusMode() const 15 String PhotoCapabilities::focusMode() const
20 { 16 {
21 switch (m_focusMode) { 17 switch (m_focusMode) {
22 case media::mojom::blink::FocusMode::UNAVAILABLE: 18 case media::mojom::blink::FocusMode::UNAVAILABLE:
23 return "unavailable"; 19 return "unavailable";
24 case media::mojom::blink::FocusMode::AUTO: 20 case media::mojom::blink::FocusMode::AUTO:
25 return "auto"; 21 return "auto";
26 case media::mojom::blink::FocusMode::MANUAL: 22 case media::mojom::blink::FocusMode::MANUAL:
27 return "manual"; 23 return "manual";
28 default: 24 default:
29 NOTREACHED(); 25 NOTREACHED();
30 } 26 }
31 return emptyString(); 27 return emptyString();
32 } 28 }
33 29
34 void PhotoCapabilities::setFocusMode(media::mojom::blink::FocusMode focusMode)
35 {
36 m_focusMode = focusMode;
37 }
38
39 DEFINE_TRACE(PhotoCapabilities) 30 DEFINE_TRACE(PhotoCapabilities)
40 { 31 {
32 visitor->trace(m_iso);
33 visitor->trace(m_imageHeight);
34 visitor->trace(m_imageWidth);
41 visitor->trace(m_zoom); 35 visitor->trace(m_zoom);
42 } 36 }
43 37
44 } // namespace blink 38 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698