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

Side by Side Diff: media/blink/webmediaplayer_delegate.h

Issue 1796403002: Don't mark a WebMediaPlayer as idle until it has size and first frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_BLINK_WEBMEDIAPLAYER_DELEGATE_H_ 5 #ifndef MEDIA_BLINK_WEBMEDIAPLAYER_DELEGATE_H_
6 #define MEDIA_BLINK_WEBMEDIAPLAYER_DELEGATE_H_ 6 #define MEDIA_BLINK_WEBMEDIAPLAYER_DELEGATE_H_
7 7
8 namespace blink { 8 namespace blink {
9 class WebMediaPlayer; 9 class WebMediaPlayer;
10 } 10 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 virtual int AddObserver(Observer* observer) = 0; 46 virtual int AddObserver(Observer* observer) = 0;
47 virtual void RemoveObserver(int delegate_id) = 0; 47 virtual void RemoveObserver(int delegate_id) = 0;
48 48
49 // The specified player started playing media. 49 // The specified player started playing media.
50 virtual void DidPlay(int delegate_id, 50 virtual void DidPlay(int delegate_id,
51 bool has_video, 51 bool has_video,
52 bool has_audio, 52 bool has_audio,
53 bool is_remote, 53 bool is_remote,
54 base::TimeDelta duration) = 0; 54 base::TimeDelta duration) = 0;
55 55
56 // The specified player stopped playing media. 56 // The specified player stopped playing media. This may be called at any time
57 // with or without a DidPlay() having previously occurred. Calling this will
58 // cause the delegate to be registered for idle suspension. I.e., after some
59 // time elapses without a DidPlay(), OnSuspendRequested() will be issued.
57 virtual void DidPause(int delegate_id, bool reached_end_of_stream) = 0; 60 virtual void DidPause(int delegate_id, bool reached_end_of_stream) = 0;
58 61
59 // The specified player was destroyed or suspended and will no longer accept 62 // The specified player was destroyed or suspended and will no longer accept
60 // Observer::OnPlay() or Observer::OnPause() calls. This may be called 63 // Observer::OnPlay() or Observer::OnPause() calls. This may be called
61 // multiple times in row. Note: Clients must still call RemoveObserver() to 64 // multiple times in row. Note: Clients must still call RemoveObserver() to
62 // unsubscribe from callbacks. 65 // unsubscribe from callbacks.
63 virtual void PlayerGone(int delegate_id) = 0; 66 virtual void PlayerGone(int delegate_id) = 0;
64 67
65 // Returns whether the render frame is currently hidden. 68 // Returns whether the render frame is currently hidden.
66 virtual bool IsHidden() = 0; 69 virtual bool IsHidden() = 0;
67 70
68 protected: 71 protected:
69 virtual ~WebMediaPlayerDelegate() {} 72 virtual ~WebMediaPlayerDelegate() {}
70 }; 73 };
71 74
72 } // namespace media 75 } // namespace media
73 76
74 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_DELEGATE_H_ 77 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698