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

Side by Side Diff: Source/modules/mediarecorder/MediaRecorder.h

Issue 1354863002: MediaRecorder: Adding BlobEvent and connecting it in MediaRecorderHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: BlobEvent in global-interface-listing-expected.txt, and rebase Created 5 years, 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 MediaRecorder_h 5 #ifndef MediaRecorder_h
6 #define MediaRecorder_h 6 #define MediaRecorder_h
7 7
8 #include "core/dom/ActiveDOMObject.h" 8 #include "core/dom/ActiveDOMObject.h"
9 #include "core/events/EventTarget.h" 9 #include "core/events/EventTarget.h"
10 #include "modules/EventTargetModules.h" 10 #include "modules/EventTargetModules.h"
11 #include "modules/ModulesExport.h" 11 #include "modules/ModulesExport.h"
12 #include "modules/mediastream/MediaStream.h" 12 #include "modules/mediastream/MediaStream.h"
13 #include "platform/AsyncMethodRunner.h" 13 #include "platform/AsyncMethodRunner.h"
14 #include "public/platform/WebMediaRecorderHandler.h" 14 #include "public/platform/WebMediaRecorderHandler.h"
15 #include "public/platform/WebMediaRecorderHandlerClient.h" 15 #include "public/platform/WebMediaRecorderHandlerClient.h"
16 16
17 namespace blink { 17 namespace blink {
18 18
19 class BlobData; 19 class Blob;
20 class ExceptionState; 20 class ExceptionState;
21 21
22 class MODULES_EXPORT MediaRecorder final 22 class MODULES_EXPORT MediaRecorder final
23 : public RefCountedGarbageCollectedEventTargetWithInlineData<MediaRecorder> 23 : public RefCountedGarbageCollectedEventTargetWithInlineData<MediaRecorder>
24 , public WebMediaRecorderHandlerClient 24 , public WebMediaRecorderHandlerClient
25 , public ActiveDOMObject { 25 , public ActiveDOMObject {
26 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(MediaRecorder); 26 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(MediaRecorder);
27 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaRecorder); 27 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaRecorder);
28 DEFINE_WRAPPERTYPEINFO(); 28 DEFINE_WRAPPERTYPEINFO();
29 public: 29 public:
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 virtual void writeData(const char* data, size_t length, bool lastInSlice) ov erride; 74 virtual void writeData(const char* data, size_t length, bool lastInSlice) ov erride;
75 virtual void failOutOfMemory(const WebString& message) override; 75 virtual void failOutOfMemory(const WebString& message) override;
76 virtual void failIllegalStreamModification(const WebString& message) overrid e; 76 virtual void failIllegalStreamModification(const WebString& message) overrid e;
77 virtual void failOtherRecordingError(const WebString& message) override; 77 virtual void failOtherRecordingError(const WebString& message) override;
78 78
79 DECLARE_VIRTUAL_TRACE(); 79 DECLARE_VIRTUAL_TRACE();
80 80
81 private: 81 private:
82 MediaRecorder(ExecutionContext*, MediaStream*, const String& mimeType, Excep tionState&); 82 MediaRecorder(ExecutionContext*, MediaStream*, const String& mimeType, Excep tionState&);
83 83
84 void createBlobEvent(PassOwnPtr<BlobData> blobData); 84 void createBlobEvent(Blob*);
85 85
86 void stopRecording(); 86 void stopRecording();
87 void scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event>); 87 void scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event>);
88 void dispatchScheduledEvent(); 88 void dispatchScheduledEvent();
89 89
90 Member<MediaStream> m_stream; 90 Member<MediaStream> m_stream;
91 String m_mimeType; 91 String m_mimeType;
92 bool m_stopped; 92 bool m_stopped;
93 bool m_ignoreMutedMedia; 93 bool m_ignoreMutedMedia;
94 94
95 State m_state; 95 State m_state;
96 96
97 OwnPtr<WebMediaRecorderHandler> m_recorderHandler; 97 OwnPtr<WebMediaRecorderHandler> m_recorderHandler;
98 98
99 AsyncMethodRunner<MediaRecorder> m_dispatchScheduledEventRunner; 99 AsyncMethodRunner<MediaRecorder> m_dispatchScheduledEventRunner;
100 WillBeHeapVector<RefPtrWillBeMember<Event>> m_scheduledEvents; 100 WillBeHeapVector<RefPtrWillBeMember<Event>> m_scheduledEvents;
101 }; 101 };
102 102
103 } // namespace blink 103 } // namespace blink
104 104
105 #endif // MediaRecorder_h 105 #endif // MediaRecorder_h
OLDNEW
« no previous file with comments | « Source/modules/mediarecorder/BlobEventInit.idl ('k') | Source/modules/mediarecorder/MediaRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698