| 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 ImageCapture_h | 5 #ifndef ImageCapture_h |
| 6 #define ImageCapture_h | 6 #define ImageCapture_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ActiveScriptWrappable.h" | 8 #include "bindings/core/v8/ActiveScriptWrappable.h" |
| 9 #include "bindings/core/v8/ScriptPromise.h" | 9 #include "bindings/core/v8/ScriptPromise.h" |
| 10 #include "core/dom/ContextLifecycleObserver.h" | 10 #include "core/dom/ContextLifecycleObserver.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 54 |
| 55 ScriptPromise grabFrame(ScriptState*, ExceptionState&); | 55 ScriptPromise grabFrame(ScriptState*, ExceptionState&); |
| 56 | 56 |
| 57 DECLARE_VIRTUAL_TRACE(); | 57 DECLARE_VIRTUAL_TRACE(); |
| 58 | 58 |
| 59 private: | 59 private: |
| 60 ImageCapture(ExecutionContext*, MediaStreamTrack*); | 60 ImageCapture(ExecutionContext*, MediaStreamTrack*); |
| 61 | 61 |
| 62 void onCapabilities(ScriptPromiseResolver*, media::mojom::blink::PhotoCapabi
litiesPtr); | 62 void onCapabilities(ScriptPromiseResolver*, media::mojom::blink::PhotoCapabi
litiesPtr); |
| 63 void onSetOptions(ScriptPromiseResolver*, bool); | 63 void onSetOptions(ScriptPromiseResolver*, bool); |
| 64 void onTakePhoto(ScriptPromiseResolver*, const String& mimeType, mojo::WTFAr
ray<uint8_t> data); | 64 void onTakePhoto(ScriptPromiseResolver*, const String& mimeType, const Vecto
r<uint8_t>& data); |
| 65 void onServiceConnectionError(); | 65 void onServiceConnectionError(); |
| 66 | 66 |
| 67 Member<MediaStreamTrack> m_streamTrack; | 67 Member<MediaStreamTrack> m_streamTrack; |
| 68 std::unique_ptr<WebImageCaptureFrameGrabber> m_frameGrabber; | 68 std::unique_ptr<WebImageCaptureFrameGrabber> m_frameGrabber; |
| 69 media::mojom::blink::ImageCapturePtr m_service; | 69 media::mojom::blink::ImageCapturePtr m_service; |
| 70 | 70 |
| 71 HeapHashSet<Member<ScriptPromiseResolver>> m_serviceRequests; | 71 HeapHashSet<Member<ScriptPromiseResolver>> m_serviceRequests; |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 } // namespace blink | 74 } // namespace blink |
| 75 | 75 |
| 76 #endif // ImageCapture_h | 76 #endif // ImageCapture_h |
| OLD | NEW |