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

Side by Side Diff: Source/platform/graphics/media/MediaPlayer.h

Issue 306123003: Eliminate MediaPlayer & MediaPlayerClient abstractions(seek, duration, poster APIs) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed review comments Created 6 years, 6 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 /* 1 /*
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 MediaPlayer() { } 110 MediaPlayer() { }
111 virtual ~MediaPlayer() { } 111 virtual ~MediaPlayer() { }
112 112
113 virtual void load(blink::WebMediaPlayer::LoadType, const String& url, blink: :WebMediaPlayer::CORSMode) = 0; 113 virtual void load(blink::WebMediaPlayer::LoadType, const String& url, blink: :WebMediaPlayer::CORSMode) = 0;
114 114
115 virtual void play() = 0; 115 virtual void play() = 0;
116 virtual void pause() = 0; 116 virtual void pause() = 0;
117 117
118 virtual bool supportsSave() const = 0; 118 virtual bool supportsSave() const = 0;
119 119
120 virtual double duration() const = 0;
121
122 virtual double currentTime() const = 0;
123
124 virtual void seek(double) = 0;
125
126 virtual bool seeking() const = 0;
127
128 virtual double rate() const = 0; 120 virtual double rate() const = 0;
129 virtual void setRate(double) = 0; 121 virtual void setRate(double) = 0;
130 122
131 virtual bool paused() const = 0; 123 virtual bool paused() const = 0;
132 124
133 virtual void setPoster(const KURL&) = 0;
134
135 enum NetworkState { Empty, Idle, Loading, Loaded, FormatError, NetworkError, DecodeError }; 125 enum NetworkState { Empty, Idle, Loading, Loaded, FormatError, NetworkError, DecodeError };
136 virtual NetworkState networkState() const = 0; 126 virtual NetworkState networkState() const = 0;
137 127
138 enum ReadyState { HaveNothing, HaveMetadata, HaveCurrentData, HaveFutureDat a, HaveEnoughData }; 128 enum ReadyState { HaveNothing, HaveMetadata, HaveCurrentData, HaveFutureDat a, HaveEnoughData };
139 virtual ReadyState readyState() const = 0; 129 virtual ReadyState readyState() const = 0;
140 130
141 virtual double maxTimeSeekable() const = 0; 131 virtual double maxTimeSeekable() const = 0;
142 virtual PassRefPtr<TimeRanges> buffered() const = 0; 132 virtual PassRefPtr<TimeRanges> buffered() const = 0;
143 133
144 virtual bool didLoadingProgress() const = 0; 134 virtual bool didLoadingProgress() const = 0;
(...skipping 12 matching lines...) Expand all
157 147
158 #if ENABLE(WEB_AUDIO) 148 #if ENABLE(WEB_AUDIO)
159 virtual AudioSourceProvider* audioSourceProvider() = 0; 149 virtual AudioSourceProvider* audioSourceProvider() = 0;
160 #endif 150 #endif
161 virtual blink::WebMediaPlayer* webMediaPlayer() const = 0; 151 virtual blink::WebMediaPlayer* webMediaPlayer() const = 0;
162 }; 152 };
163 153
164 } 154 }
165 155
166 #endif // MediaPlayer_h 156 #endif // MediaPlayer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698