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

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

Issue 2877273002: Image Capture: reject setOptions()/applyConstraints() if any argument is unsupported (Closed)
Patch Set: reverted renaming bc it breaks patching Created 3 years, 7 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 ImageCapture_h 5 #ifndef ImageCapture_h
6 #define ImageCapture_h 6 #define ImageCapture_h
7 7
8 #include <memory> 8 #include <memory>
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"
11 #include "core/events/EventTarget.h" 11 #include "core/events/EventTarget.h"
12 #include "media/capture/mojo/image_capture.mojom-blink.h" 12 #include "media/capture/mojo/image_capture.mojom-blink.h"
13 #include "modules/EventTargetModules.h" 13 #include "modules/EventTargetModules.h"
14 #include "modules/ModulesExport.h" 14 #include "modules/ModulesExport.h"
15 #include "modules/mediastream/MediaTrackCapabilities.h" 15 #include "modules/mediastream/MediaTrackCapabilities.h"
16 #include "modules/mediastream/MediaTrackConstraintSet.h" 16 #include "modules/mediastream/MediaTrackConstraintSet.h"
17 #include "modules/mediastream/MediaTrackSettings.h" 17 #include "modules/mediastream/MediaTrackSettings.h"
18 #include "platform/AsyncMethodRunner.h" 18 #include "platform/AsyncMethodRunner.h"
19 #include "platform/bindings/ActiveScriptWrappable.h" 19 #include "platform/bindings/ActiveScriptWrappable.h"
20 20
21 namespace blink { 21 namespace blink {
22 22
23 class ExceptionState; 23 class ExceptionState;
24 class MediaStreamTrack; 24 class MediaStreamTrack;
25 class MediaTrackConstraints; 25 class MediaTrackConstraints;
26 class PhotoCapabilities;
26 class PhotoSettings; 27 class PhotoSettings;
27 class ScriptPromiseResolver; 28 class ScriptPromiseResolver;
28 class WebImageCaptureFrameGrabber; 29 class WebImageCaptureFrameGrabber;
29 30
30 // TODO(mcasas): Consideradding a LayoutTest checking that this class is not 31 // TODO(mcasas): Consideradding a LayoutTest checking that this class is not
31 // garbage collected while it has event listeners. 32 // garbage collected while it has event listeners.
32 class MODULES_EXPORT ImageCapture final 33 class MODULES_EXPORT ImageCapture final
33 : public EventTargetWithInlineData, 34 : public EventTargetWithInlineData,
34 public ActiveScriptWrappable<ImageCapture>, 35 public ActiveScriptWrappable<ImageCapture>,
35 public ContextLifecycleObserver { 36 public ContextLifecycleObserver {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 void OnServiceConnectionError(); 93 void OnServiceConnectionError();
93 94
94 Member<MediaStreamTrack> stream_track_; 95 Member<MediaStreamTrack> stream_track_;
95 std::unique_ptr<WebImageCaptureFrameGrabber> frame_grabber_; 96 std::unique_ptr<WebImageCaptureFrameGrabber> frame_grabber_;
96 media::mojom::blink::ImageCapturePtr service_; 97 media::mojom::blink::ImageCapturePtr service_;
97 98
98 MediaTrackCapabilities capabilities_; 99 MediaTrackCapabilities capabilities_;
99 MediaTrackSettings settings_; 100 MediaTrackSettings settings_;
100 MediaTrackConstraintSet current_constraints_; 101 MediaTrackConstraintSet current_constraints_;
101 102
103 Member<PhotoCapabilities> photo_capabilities_;
104
102 HeapHashSet<Member<ScriptPromiseResolver>> service_requests_; 105 HeapHashSet<Member<ScriptPromiseResolver>> service_requests_;
103 }; 106 };
104 107
105 } // namespace blink 108 } // namespace blink
106 109
107 #endif // ImageCapture_h 110 #endif // ImageCapture_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698