Chromium Code Reviews| 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 #ifndef PhotoCapabilities_h | 5 #ifndef PhotoCapabilities_h |
| 6 #define PhotoCapabilities_h | 6 #define PhotoCapabilities_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
| 9 #include "modules/imagecapture/MediaSettingsRange.h" | 9 #include "modules/imagecapture/MediaSettingsRange.h" |
| 10 #include "wtf/text/WTFString.h" | 10 #include "wtf/text/WTFString.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class PhotoCapabilities final | 14 class PhotoCapabilities final |
| 15 : public GarbageCollectedFinalized<PhotoCapabilities> | 15 : public GarbageCollectedFinalized<PhotoCapabilities> |
| 16 , public ScriptWrappable { | 16 , public ScriptWrappable { |
| 17 DEFINE_WRAPPERTYPEINFO(); | 17 DEFINE_WRAPPERTYPEINFO(); |
| 18 public: | 18 public: |
| 19 static PhotoCapabilities* create() | 19 enum FocusMode { Unavailable, Auto, Manual }; |
|
Reilly Grant (use Gerrit)
2016/07/09 00:06:31
Just use the Mojo enum.
mcasas
2016/07/09 01:45:59
Nice! Done.
| |
| 20 { | 20 |
| 21 return new PhotoCapabilities(); | 21 static PhotoCapabilities* create(); |
| 22 } | |
| 23 virtual ~PhotoCapabilities() = default; | 22 virtual ~PhotoCapabilities() = default; |
| 24 | 23 |
| 25 MediaSettingsRange* zoom() const { return m_zoom; } | 24 MediaSettingsRange* zoom() const; |
| 26 void setZoom(MediaSettingsRange* value) { m_zoom = value; } | 25 void setZoom(MediaSettingsRange* value); |
| 27 | 26 |
| 28 DEFINE_INLINE_TRACE() | 27 String focusMode() const; |
| 29 { | 28 void setFocusMode(FocusMode); |
| 30 visitor->trace(m_zoom); | 29 |
| 31 } | 30 DECLARE_VIRTUAL_TRACE(); |
| 32 | 31 |
| 33 private: | 32 private: |
| 34 PhotoCapabilities() = default; | 33 PhotoCapabilities() = default; |
| 35 | 34 |
| 36 Member<MediaSettingsRange> m_zoom; | 35 Member<MediaSettingsRange> m_zoom; |
| 36 FocusMode m_focusMode; | |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 } // namespace blink | 39 } // namespace blink |
| 40 | 40 |
| 41 #endif // PhotoCapabilities_h | 41 #endif // PhotoCapabilities_h |
| OLD | NEW |