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

Side by Side Diff: media/base/android/media_player_android.h

Issue 1215713021: Reverted the code for the non-interactive audible tab notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@notification
Patch Set: Fixed indent Created 5 years, 3 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
« no previous file with comments | « media/base/android/media_decoder_job.h ('k') | media/base/android/media_player_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_ 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_
6 #define MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_ 6 #define MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 virtual void OnBufferingUpdate(int percent); 113 virtual void OnBufferingUpdate(int percent);
114 virtual void OnPlaybackComplete(); 114 virtual void OnPlaybackComplete();
115 virtual void OnMediaInterrupted(); 115 virtual void OnMediaInterrupted();
116 virtual void OnSeekComplete(); 116 virtual void OnSeekComplete();
117 virtual void OnMediaPrepared(); 117 virtual void OnMediaPrepared();
118 118
119 // When destroying a subclassed object on a non-UI thread 119 // When destroying a subclassed object on a non-UI thread
120 // it is still required to destroy the |listener_| related stuff 120 // it is still required to destroy the |listener_| related stuff
121 // on the UI thread. 121 // on the UI thread.
122 void DestroyListenerOnUIThread(); 122 void DestroyListenerOnUIThread();
123 void SetAudible(bool is_audible);
124 123
125 MediaPlayerManager* manager() { return manager_; } 124 MediaPlayerManager* manager() { return manager_; }
126 125
127 base::WeakPtr<MediaPlayerAndroid> WeakPtrForUIThread(); 126 base::WeakPtr<MediaPlayerAndroid> WeakPtrForUIThread();
128 127
129 RequestMediaResourcesCB request_media_resources_cb_; 128 RequestMediaResourcesCB request_media_resources_cb_;
130 129
131 private: 130 private:
132 friend class MediaPlayerListener; 131 friend class MediaPlayerListener;
133 132
134 // Player ID assigned to this player. 133 // Player ID assigned to this player.
135 int player_id_; 134 int player_id_;
136 135
137 // Resource manager for all the media players. 136 // Resource manager for all the media players.
138 MediaPlayerManager* manager_; 137 MediaPlayerManager* manager_;
139 138
140 // Url for the frame that contains this player. 139 // Url for the frame that contains this player.
141 GURL frame_url_; 140 GURL frame_url_;
142 141
143 // Listener object that listens to all the media player events. 142 // Listener object that listens to all the media player events.
144 scoped_ptr<MediaPlayerListener> listener_; 143 scoped_ptr<MediaPlayerListener> listener_;
145 144
146 // Maintains the audible state of the player, true if it is playing sound.
147 bool is_audible_;
148
149 // Weak pointer passed to |listener_| for callbacks. 145 // Weak pointer passed to |listener_| for callbacks.
150 // NOTE: Weak pointers must be invalidated before all other member variables. 146 // NOTE: Weak pointers must be invalidated before all other member variables.
151 base::WeakPtrFactory<MediaPlayerAndroid> weak_factory_; 147 base::WeakPtrFactory<MediaPlayerAndroid> weak_factory_;
152 148
153 DISALLOW_COPY_AND_ASSIGN(MediaPlayerAndroid); 149 DISALLOW_COPY_AND_ASSIGN(MediaPlayerAndroid);
154 }; 150 };
155 151
156 } // namespace media 152 } // namespace media
157 153
158 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_ 154 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_
OLDNEW
« no previous file with comments | « media/base/android/media_decoder_job.h ('k') | media/base/android/media_player_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698