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 "modules/imagecapture/ImageCapture.h" | 5 #include "modules/imagecapture/ImageCapture.h" |
6 | 6 |
7 #include "bindings/core/v8/CallbackPromiseAdapter.h" | 7 #include "bindings/core/v8/CallbackPromiseAdapter.h" |
8 #include "bindings/core/v8/ScriptPromiseResolver.h" | 8 #include "bindings/core/v8/ScriptPromiseResolver.h" |
9 #include "core/dom/DOMException.h" | 9 #include "core/dom/DOMException.h" |
10 #include "core/dom/ExceptionCode.h" | 10 #include "core/dom/ExceptionCode.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "public/platform/WebMediaStreamTrack.h" | 22 #include "public/platform/WebMediaStreamTrack.h" |
23 #include "wtf/PtrUtil.h" | 23 #include "wtf/PtrUtil.h" |
24 | 24 |
25 namespace blink { | 25 namespace blink { |
26 | 26 |
27 namespace { | 27 namespace { |
28 | 28 |
29 const char kNoServiceError[] = "ImageCapture service unavailable."; | 29 const char kNoServiceError[] = "ImageCapture service unavailable."; |
30 | 30 |
31 bool trackIsInactive(const MediaStreamTrack& track) { | 31 bool trackIsInactive(const MediaStreamTrack& track) { |
32 // Spec instructs to return an exception if the Track's readyState() is not | 32 // Spec instructs to return an exception if the Track's getReadyState() is not |
33 // "live". Also reject if the track is disabled or muted. | 33 // "live". Also reject if the track is disabled or muted. |
34 return track.readyState() != "live" || !track.enabled() || track.muted(); | 34 return track.getReadyState() != "live" || !track.enabled() || track.muted(); |
35 } | 35 } |
36 | 36 |
37 media::mojom::blink::MeteringMode parseMeteringMode(const String& blinkMode) { | 37 media::mojom::blink::MeteringMode parseMeteringMode(const String& blinkMode) { |
38 if (blinkMode == "manual") | 38 if (blinkMode == "manual") |
39 return media::mojom::blink::MeteringMode::MANUAL; | 39 return media::mojom::blink::MeteringMode::MANUAL; |
40 if (blinkMode == "single-shot") | 40 if (blinkMode == "single-shot") |
41 return media::mojom::blink::MeteringMode::SINGLE_SHOT; | 41 return media::mojom::blink::MeteringMode::SINGLE_SHOT; |
42 if (blinkMode == "continuous") | 42 if (blinkMode == "continuous") |
43 return media::mojom::blink::MeteringMode::CONTINUOUS; | 43 return media::mojom::blink::MeteringMode::CONTINUOUS; |
44 return media::mojom::blink::MeteringMode::NONE; | 44 return media::mojom::blink::MeteringMode::NONE; |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 } | 383 } |
384 | 384 |
385 DEFINE_TRACE(ImageCapture) { | 385 DEFINE_TRACE(ImageCapture) { |
386 visitor->trace(m_streamTrack); | 386 visitor->trace(m_streamTrack); |
387 visitor->trace(m_serviceRequests); | 387 visitor->trace(m_serviceRequests); |
388 EventTargetWithInlineData::trace(visitor); | 388 EventTargetWithInlineData::trace(visitor); |
389 ContextLifecycleObserver::trace(visitor); | 389 ContextLifecycleObserver::trace(visitor); |
390 } | 390 } |
391 | 391 |
392 } // namespace blink | 392 } // namespace blink |
OLD | NEW |