From 722e0dff34891a578169a98b0d985432b66b3fbf Mon Sep 17 00:00:00 2001 From: "cramya@chromium.org" Date: Wed, 18 Jul 2012 19:48:37 +0000 Subject: Upstream ContentVideoView.java content_video_view.* media_metadata_android.* BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10680008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147296 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/media/android/media_metadata_android.cc | 39 ++++++++++++++++++++++++++ webkit/media/android/media_metadata_android.h | 38 +++++++++++++++++++++++++ webkit/media/webkit_media.gypi | 2 ++ 3 files changed, 79 insertions(+) create mode 100644 webkit/media/android/media_metadata_android.cc create mode 100644 webkit/media/android/media_metadata_android.h (limited to 'webkit') diff --git a/webkit/media/android/media_metadata_android.cc b/webkit/media/android/media_metadata_android.cc new file mode 100644 index 0000000..4f6e169 --- /dev/null +++ b/webkit/media/android/media_metadata_android.cc @@ -0,0 +1,39 @@ +// Copyright (c) 2012 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. + +#include "webkit/media/android/media_metadata_android.h" + +namespace webkit_media { + +MediaMetadataAndroid::MediaMetadataAndroid() + : width(0), + height(0), + paused(false), + can_pause(false), + can_seek_forward(false), + can_seek_backward(false) { +} + +MediaMetadataAndroid::MediaMetadataAndroid(int w, + int h, + base::TimeDelta d, + base::TimeDelta ct, + bool p, + bool cp, + bool csf, + bool csb) + : width(w), + height(h), + duration(d), + current_time(ct), + paused(p), + can_pause(cp), + can_seek_forward(csf), + can_seek_backward(csb) { +} + +MediaMetadataAndroid::~MediaMetadataAndroid() { +} + +} // namespace webkit_media diff --git a/webkit/media/android/media_metadata_android.h b/webkit/media/android/media_metadata_android.h new file mode 100644 index 0000000..3298f934 --- /dev/null +++ b/webkit/media/android/media_metadata_android.h @@ -0,0 +1,38 @@ +// Copyright (c) 2012 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 WEBKIT_MEDIA_ANDROID_MEDIA_METADATA_ANDROID_H_ +#define WEBKIT_MEDIA_ANDROID_MEDIA_METADATA_ANDROID_H_ + +#include "base/basictypes.h" +#include "base/time.h" + +namespace webkit_media { + +// Provides the initial media metadata to ContentVideoView. +struct MediaMetadataAndroid { + MediaMetadataAndroid(); + MediaMetadataAndroid(int w, + int h, + base::TimeDelta d, + base::TimeDelta ct, + bool p, + bool cp, + bool csf, + bool csb); + ~MediaMetadataAndroid(); + + int width; + int height; + base::TimeDelta duration; + base::TimeDelta current_time; + bool paused; + bool can_pause; + bool can_seek_forward; + bool can_seek_backward; +}; + +} // namespace webkit_media + +#endif // WEBKIT_MEDIA_ANDROID_MEDIA_METADATA_ANDROID_H_ diff --git a/webkit/media/webkit_media.gypi b/webkit/media/webkit_media.gypi index 702031a..203b700e 100644 --- a/webkit/media/webkit_media.gypi +++ b/webkit/media/webkit_media.gypi @@ -15,6 +15,8 @@ ], 'sources': [ 'android/audio_decoder_android.cc', + 'android/media_metadata_android.cc', + 'android/media_metadata_android.h', 'android/stream_texture_factory_android.h', 'android/webmediaplayer_android.cc', 'android/webmediaplayer_android.h', -- cgit v1.1