Allow the externalfile scheme to be whitelisted as an allowed scheme for component...
[chromium-blink-merge.git] / media / blink / webmediaplayer_util.h
blob159be7714ceeaeaf71dce04adbcf864b38dfe258
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef MEDIA_BLINK_WEBMEDIAPLAYER_UTIL_H_
6 #define MEDIA_BLINK_WEBMEDIAPLAYER_UTIL_H_
8 #include "base/time/time.h"
9 #include "media/base/media_export.h"
10 #include "media/base/pipeline_status.h"
11 #include "media/base/ranges.h"
12 #include "third_party/WebKit/public/platform/WebMediaPlayer.h"
13 #include "third_party/WebKit/public/platform/WebTimeRange.h"
14 #include "url/gurl.h"
16 namespace media {
18 // Platform independent method for converting and rounding floating point
19 // seconds to an int64 timestamp.
21 // Refer to https://bugs.webkit.org/show_bug.cgi?id=52697 for details.
22 base::TimeDelta MEDIA_EXPORT ConvertSecondsToTimestamp(double seconds);
24 blink::WebTimeRanges MEDIA_EXPORT ConvertToWebTimeRanges(
25 const Ranges<base::TimeDelta>& ranges);
27 blink::WebMediaPlayer::NetworkState MEDIA_EXPORT PipelineErrorToNetworkState(
28 PipelineStatus error);
30 // Report the scheme of Media URIs.
31 void MEDIA_EXPORT ReportMediaSchemeUma(const GURL& url);
33 } // namespace media
35 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_UTIL_H_