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

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

Issue 2034003002: Revert of ImageCapture: move mojom from WebKit/public to media/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 "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"
11 #include "core/events/EventTarget.h" 11 #include "core/events/EventTarget.h"
12 #include "media/mojo/interfaces/image_capture.mojom-blink.h"
13 #include "modules/EventTargetModules.h" 12 #include "modules/EventTargetModules.h"
14 #include "modules/ModulesExport.h" 13 #include "modules/ModulesExport.h"
15 #include "platform/AsyncMethodRunner.h" 14 #include "platform/AsyncMethodRunner.h"
15 #include "public/platform/modules/imagecapture/image_capture.mojom-blink.h"
16 16
17 namespace blink { 17 namespace blink {
18 18
19 class ExceptionState; 19 class ExceptionState;
20 class MediaStreamTrack; 20 class MediaStreamTrack;
21 class WebImageCaptureFrameGrabber; 21 class WebImageCaptureFrameGrabber;
22 22
23 // TODO(mcasas): Consideradding a LayoutTest checking that this class is not 23 // TODO(mcasas): Consideradding a LayoutTest checking that this class is not
24 // garbage collected while it has event listeners. 24 // garbage collected while it has event listeners.
25 class MODULES_EXPORT ImageCapture final 25 class MODULES_EXPORT ImageCapture final
(...skipping 22 matching lines...) Expand all
48 48
49 ScriptPromise takePhoto(ScriptState*, ExceptionState&); 49 ScriptPromise takePhoto(ScriptState*, ExceptionState&);
50 50
51 ScriptPromise grabFrame(ScriptState*, ExceptionState&); 51 ScriptPromise grabFrame(ScriptState*, ExceptionState&);
52 52
53 DECLARE_VIRTUAL_TRACE(); 53 DECLARE_VIRTUAL_TRACE();
54 54
55 private: 55 private:
56 ImageCapture(ExecutionContext*, MediaStreamTrack*); 56 ImageCapture(ExecutionContext*, MediaStreamTrack*);
57 57
58 void onCapabilities(ScriptPromiseResolver*, media::mojom::blink::PhotoCapabi litiesPtr); 58 void onCapabilities(ScriptPromiseResolver*, mojom::blink::PhotoCapabilitiesP tr);
59 void onTakePhoto(ScriptPromiseResolver*, const String& mimeType, mojo::WTFAr ray<uint8_t> data); 59 void onTakePhoto(ScriptPromiseResolver*, const String& mimeType, mojo::WTFAr ray<uint8_t> data);
60 void onServiceConnectionError(); 60 void onServiceConnectionError();
61 61
62 Member<MediaStreamTrack> m_streamTrack; 62 Member<MediaStreamTrack> m_streamTrack;
63 OwnPtr<WebImageCaptureFrameGrabber> m_frameGrabber; 63 OwnPtr<WebImageCaptureFrameGrabber> m_frameGrabber;
64 media::mojom::blink::ImageCapturePtr m_service; 64 mojom::blink::ImageCapturePtr m_service;
65 65
66 HeapHashSet<Member<ScriptPromiseResolver>> m_serviceRequests; 66 HeapHashSet<Member<ScriptPromiseResolver>> m_serviceRequests;
67 }; 67 };
68 68
69 } // namespace blink 69 } // namespace blink
70 70
71 #endif // ImageCapture_h 71 #endif // ImageCapture_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/imagecapture/DEPS ('k') | third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698