Chromium Code Reviews| Index: media/base/android/media_url_interceptor.h |
| diff --git a/media/base/android/media_url_interceptor.h b/media/base/android/media_url_interceptor.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2f483fc8185b9f5887053966213b56ea932e90a2 |
| --- /dev/null |
| +++ b/media/base/android/media_url_interceptor.h |
| @@ -0,0 +1,36 @@ |
| +// Copyright (c) 2014 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 MEDIA_BASE_ANDROID_MEDIA_URL_INTERCEPTOR_H_ |
| +#define MEDIA_BASE_ANDROID_MEDIA_URL_INTERCEPTOR_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/android/jni_android.h" |
| +#include "media/base/media_export.h" |
| + |
| +namespace media { |
| + |
| +// Interceptor for content embedders to handle custom media urls |
| +// and translate them into files containing media. |
| +class MEDIA_EXPORT MediaUrlInterceptor { |
| + public: |
| + virtual ~MediaUrlInterceptor() {}; |
| + |
| + // Return true if the embedder has intercepted the url and |
|
qinmin
2014/07/24 21:05:28
s/Return/Returns/
Ignacio Solla
2014/07/25 10:35:07
Done.
|
| + // false otherwise. |
| + // Output arguments (only when url intercepted): |
| + // - |fd|: file descriptor to the file containing the media element. |
| + // - |offset|: offset in bytes from the start of the file to the |
| + // media element. |
| + // - |size|: size in bytes of the media element. |
| + virtual bool Intercept(const std::string& url, |
| + int* fd, |
|
qinmin
2014/07/24 21:05:28
align the indentations with the param above
Ignacio Solla
2014/07/25 10:35:07
Done.
|
| + int64* offset, |
| + int64* size) const = 0; |
|
mnaganov (inactive)
2014/07/25 08:17:49
Pro-tip: use Clang format to do the dirty job for
Ignacio Solla
2014/07/25 10:35:07
Thanks for the tip.
(In this case I have decided
|
| +}; |
| + |
| +} // namespace media |
| + |
| +#endif // MEDIA_BASE_ANDROID_MEDIA_URL_INTERCEPTOR_H_ |