Chromium Code Reviews| Index: public/platform/WebMediaRecorderHandler.h |
| diff --git a/public/platform/WebMediaRecorderHandler.h b/public/platform/WebMediaRecorderHandler.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..df393931040b9b0b66dfd81015ef41392204026b |
| --- /dev/null |
| +++ b/public/platform/WebMediaRecorderHandler.h |
| @@ -0,0 +1,40 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef WebMediaRecorderHandler_h |
| +#define WebMediaRecorderHandler_h |
| + |
| +#include "WebCommon.h" |
| + |
| +namespace blink { |
| + |
| +class WebMediaRecorderHandlerClient; |
| +class WebMediaStream; |
| +class WebString; |
| + |
| +// Platform interface of a MediaRecorder. |
| +class BLINK_PLATFORM_EXPORT WebMediaRecorderHandler { |
| +public: |
| + virtual ~WebMediaRecorderHandler() = default; |
| + virtual bool initialize(WebMediaRecorderHandlerClient* client, |
|
Peter Beverloo
2015/08/28 17:18:24
nit: no wrapping. (Blink style)
mcasas
2015/08/29 01:12:57
Done.
|
| + const WebMediaStream& stream, |
| + const WebString& mimeType) { return false; } |
| + virtual bool start() { return false; } |
| + virtual bool start(int timeslice) { return false; } |
| + virtual void stop() {} |
| + virtual void pause() {} |
| + virtual void resume() {} |
| + |
| + // MediaRecorder API canRecordMimeType() is a tristate in which the returned |
| + // value 'probably' means that "the user agent is confident that mimeType |
| + // represents a type that it can record" [1], but a number of reasons might |
| + // prevent a firm answer at this stage, so a boolean is a better option, |
| + // because "Implementors are encouraged to return "maybe" unless the type |
| + // can be confidently established as being supported or not." [1]. |
| + // [1] http://w3c.github.io/mediacapture-record/MediaRecorder.html#methods |
| + virtual bool canSupportMimeType(const WebString& mimeType) { return false; } |
| +}; |
| + |
| +} // namespace blink |
| +#endif |
|
Peter Beverloo
2015/08/28 17:18:24
micro nit: // WebMediaRecorderHandler_h, + blank l
mcasas
2015/08/29 01:12:57
Done and in WebMediaRecorderHandlerClient.h as wel
|