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

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

Issue 203213006: Revert 169465 "Move deferred loading logic from WebMediaPlayerCl..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « trunk/Source/core/html/HTMLMediaElement.cpp ('k') | trunk/Source/web/AssertMatchingEnums.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 class TimeRanges; 51 class TimeRanges;
52 52
53 // GL types as defined in OpenGL ES 2.0 header file gl2.h from khronos.org. 53 // GL types as defined in OpenGL ES 2.0 header file gl2.h from khronos.org.
54 // That header cannot be included directly due to a conflict with NPAPI headers. 54 // That header cannot be included directly due to a conflict with NPAPI headers.
55 // See crbug.com/328085. 55 // See crbug.com/328085.
56 typedef unsigned GC3Denum; 56 typedef unsigned GC3Denum;
57 typedef int GC3Dint; 57 typedef int GC3Dint;
58 58
59 class MediaPlayerClient { 59 class MediaPlayerClient {
60 public: 60 public:
61 enum CORSMode { Unspecified, Anonymous, UseCredentials };
62
61 virtual ~MediaPlayerClient() { } 63 virtual ~MediaPlayerClient() { }
62 64
63 // the network state has changed 65 // the network state has changed
64 virtual void mediaPlayerNetworkStateChanged() = 0; 66 virtual void mediaPlayerNetworkStateChanged() = 0;
65 67
66 // the ready state has changed 68 // the ready state has changed
67 virtual void mediaPlayerReadyStateChanged() = 0; 69 virtual void mediaPlayerReadyStateChanged() = 0;
68 70
69 // time has jumped, eg. not as a result of normal playback 71 // time has jumped, eg. not as a result of normal playback
70 virtual void mediaPlayerTimeChanged() = 0; 72 virtual void mediaPlayerTimeChanged() = 0;
(...skipping 12 matching lines...) Expand all
83 // FIXME: Remove this when WebMediaPlayerClientImpl::loadInternal does not d epend on it. 85 // FIXME: Remove this when WebMediaPlayerClientImpl::loadInternal does not d epend on it.
84 virtual KURL mediaPlayerPosterURL() = 0; 86 virtual KURL mediaPlayerPosterURL() = 0;
85 87
86 // Presentation-related methods 88 // Presentation-related methods
87 // a new frame of video is available 89 // a new frame of video is available
88 virtual void mediaPlayerRepaint() = 0; 90 virtual void mediaPlayerRepaint() = 0;
89 91
90 // the movie size has changed 92 // the movie size has changed
91 virtual void mediaPlayerSizeChanged() = 0; 93 virtual void mediaPlayerSizeChanged() = 0;
92 94
95 virtual CORSMode mediaPlayerCORSMode() const = 0;
96
93 virtual void mediaPlayerSetWebLayer(blink::WebLayer*) = 0; 97 virtual void mediaPlayerSetWebLayer(blink::WebLayer*) = 0;
94 virtual void mediaPlayerSetOpaque(bool) = 0; 98 virtual void mediaPlayerSetOpaque(bool) = 0;
95 99
96 virtual void mediaPlayerDidAddTextTrack(blink::WebInbandTextTrack*) = 0; 100 virtual void mediaPlayerDidAddTextTrack(blink::WebInbandTextTrack*) = 0;
97 virtual void mediaPlayerDidRemoveTextTrack(blink::WebInbandTextTrack*) = 0; 101 virtual void mediaPlayerDidRemoveTextTrack(blink::WebInbandTextTrack*) = 0;
98 102
99 virtual void mediaPlayerMediaSourceOpened(blink::WebMediaSource*) = 0; 103 virtual void mediaPlayerMediaSourceOpened(blink::WebMediaSource*) = 0;
100 }; 104 };
101 105
102 typedef PassOwnPtr<MediaPlayer> (*CreateMediaEnginePlayer)(MediaPlayerClient*); 106 typedef PassOwnPtr<MediaPlayer> (*CreateMediaEnginePlayer)(MediaPlayerClient*);
103 107
104 class PLATFORM_EXPORT MediaPlayer { 108 class PLATFORM_EXPORT MediaPlayer {
105 WTF_MAKE_NONCOPYABLE(MediaPlayer); 109 WTF_MAKE_NONCOPYABLE(MediaPlayer);
106 public: 110 public:
107 static PassOwnPtr<MediaPlayer> create(MediaPlayerClient*); 111 static PassOwnPtr<MediaPlayer> create(MediaPlayerClient*);
108 static void setMediaEngineCreateFunction(CreateMediaEnginePlayer); 112 static void setMediaEngineCreateFunction(CreateMediaEnginePlayer);
109 113
110 static double invalidTime() { return -1.0; } 114 static double invalidTime() { return -1.0; }
111 115
112 MediaPlayer() { } 116 MediaPlayer() { }
113 virtual ~MediaPlayer() { } 117 virtual ~MediaPlayer() { }
114 118
115 virtual void load(blink::WebMediaPlayer::LoadType, const String& url, blink: :WebMediaPlayer::CORSMode) = 0; 119 virtual void load(blink::WebMediaPlayer::LoadType, const String& url) = 0;
120
121 virtual void prepareToPlay() = 0;
116 122
117 virtual void play() = 0; 123 virtual void play() = 0;
118 virtual void pause() = 0; 124 virtual void pause() = 0;
119 125
120 virtual bool supportsSave() const = 0; 126 virtual bool supportsSave() const = 0;
121 virtual IntSize naturalSize() const = 0; 127 virtual IntSize naturalSize() const = 0;
122 128
123 virtual bool hasVideo() const = 0; 129 virtual bool hasVideo() const = 0;
124 virtual bool hasAudio() const = 0; 130 virtual bool hasAudio() const = 0;
125 131
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 181
176 #if ENABLE(WEB_AUDIO) 182 #if ENABLE(WEB_AUDIO)
177 virtual AudioSourceProvider* audioSourceProvider() = 0; 183 virtual AudioSourceProvider* audioSourceProvider() = 0;
178 #endif 184 #endif
179 virtual blink::WebMediaPlayer* webMediaPlayer() const = 0; 185 virtual blink::WebMediaPlayer* webMediaPlayer() const = 0;
180 }; 186 };
181 187
182 } 188 }
183 189
184 #endif // MediaPlayer_h 190 #endif // MediaPlayer_h
OLDNEW
« no previous file with comments | « trunk/Source/core/html/HTMLMediaElement.cpp ('k') | trunk/Source/web/AssertMatchingEnums.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698