| OLD | NEW | 
|---|
| (Empty) |  | 
|  | 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 | 
|  | 3 // found in the LICENSE file. | 
|  | 4 | 
|  | 5 #ifndef ImageCapture_h | 
|  | 6 #define ImageCapture_h | 
|  | 7 | 
|  | 8 #include "bindings/core/v8/ActiveScriptWrappable.h" | 
|  | 9 #include "bindings/core/v8/ScriptPromise.h" | 
|  | 10 #include "core/dom/ActiveDOMObject.h" | 
|  | 11 #include "core/events/EventTarget.h" | 
|  | 12 #include "modules/EventTargetModules.h" | 
|  | 13 #include "modules/ModulesExport.h" | 
|  | 14 #include "platform/AsyncMethodRunner.h" | 
|  | 15 | 
|  | 16 namespace blink { | 
|  | 17 | 
|  | 18 class ExceptionState; | 
|  | 19 class MediaStreamTrack; | 
|  | 20 | 
|  | 21 class MODULES_EXPORT ImageCapture final | 
|  | 22     : public EventTargetWithInlineData | 
|  | 23     , public ActiveScriptWrappable | 
|  | 24     , public ActiveDOMObject { | 
|  | 25     USING_GARBAGE_COLLECTED_MIXIN(ImageCapture); | 
|  | 26     DEFINE_WRAPPERTYPEINFO(); | 
|  | 27 public: | 
|  | 28     static ImageCapture* create(ExecutionContext*, MediaStreamTrack*, ExceptionS
    tate&); | 
|  | 29     ~ImageCapture() = default; | 
|  | 30 | 
|  | 31     // EventTarget implementation. | 
|  | 32     const AtomicString& interfaceName() const override; | 
|  | 33     ExecutionContext* getExecutionContext() const override; | 
|  | 34 | 
|  | 35     // ActiveScriptWrappable implementation. | 
|  | 36     bool hasPendingActivity() const final; | 
|  | 37 | 
|  | 38     MediaStreamTrack* videoStreamTrack() const { return m_streamTrack.get(); } | 
|  | 39 | 
|  | 40     ScriptPromise grabFrame(ScriptState*, ExceptionState&); | 
|  | 41 | 
|  | 42     DECLARE_VIRTUAL_TRACE(); | 
|  | 43 | 
|  | 44 private: | 
|  | 45     ImageCapture(ExecutionContext*, MediaStreamTrack*); | 
|  | 46 | 
|  | 47     // EventTarget implementation. | 
|  | 48     bool addEventListenerInternal(const AtomicString& eventType, EventListener*,
     const EventListenerOptions&) override; | 
|  | 49 | 
|  | 50     Member<MediaStreamTrack> m_streamTrack; | 
|  | 51 }; | 
|  | 52 | 
|  | 53 } // namespace blink | 
|  | 54 | 
|  | 55 #endif // ImageCapture_h | 
| OLD | NEW | 
|---|