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

Side by Side Diff: third_party/WebKit/Source/modules/imagecapture/MediaSettingsRange.h

Issue 2747573002: Image Capture: MediaStreamTrack::getCapabilities() (Closed)
Patch Set: haraken@ and reillyg@s comments Created 3 years, 9 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 #ifndef MediaSettingsRange_h 5 #ifndef MediaSettingsRange_h
6 #define MediaSettingsRange_h 6 #define MediaSettingsRange_h
7 7
8 #include "bindings/core/v8/ScriptWrappable.h" 8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "media/capture/mojo/image_capture.mojom-blink.h"
9 10
10 namespace blink { 11 namespace blink {
11 12
12 class MediaSettingsRange final : public GarbageCollected<MediaSettingsRange>, 13 class MediaSettingsRange final : public GarbageCollected<MediaSettingsRange>,
13 public ScriptWrappable { 14 public ScriptWrappable {
14 DEFINE_WRAPPERTYPEINFO(); 15 DEFINE_WRAPPERTYPEINFO();
15 16
16 public: 17 public:
17 static MediaSettingsRange* create(double max, 18 static MediaSettingsRange* create(double max,
18 double min, 19 double min,
19 double current, 20 double current,
20 double step) { 21 double step) {
21 return new MediaSettingsRange(max, min, current, step); 22 return new MediaSettingsRange(max, min, current, step);
22 } 23 }
24 static MediaSettingsRange* create(media::mojom::blink::RangePtr range) {
25 return MediaSettingsRange::create(range->max, range->min, range->current,
26 range->step);
27 }
23 28
24 double max() const { return m_max; } 29 double max() const { return m_max; }
25 double min() const { return m_min; } 30 double min() const { return m_min; }
26 double current() const { return m_current; } 31 double current() const { return m_current; }
27 double step() const { return m_step; } 32 double step() const { return m_step; }
28 33
29 DEFINE_INLINE_TRACE() {} 34 DEFINE_INLINE_TRACE() {}
30 35
31 private: 36 private:
32 MediaSettingsRange(double max, double min, double current, double step) 37 MediaSettingsRange(double max, double min, double current, double step)
33 : m_max(max), m_min(min), m_current(current), m_step(step) {} 38 : m_max(max), m_min(min), m_current(current), m_step(step) {}
34 39
35 double m_max; 40 double m_max;
36 double m_min; 41 double m_min;
37 double m_current; 42 double m_current;
38 double m_step; 43 double m_step;
39 }; 44 };
40 45
41 } // namespace blink 46 } // namespace blink
42 47
43 #endif // MediaSettingsRange_h 48 #endif // MediaSettingsRange_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698