OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BRIDGE_H_ | 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_PLAYER_BRIDGE_H_ |
6 #define MEDIA_BASE_ANDROID_MEDIA_PLAYER_BRIDGE_H_ | 6 #define MEDIA_BASE_ANDROID_MEDIA_PLAYER_BRIDGE_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
168 bool can_seek_backward_; | 168 bool can_seek_backward_; |
169 | 169 |
170 // Cookies for |url_|. | 170 // Cookies for |url_|. |
171 std::string cookies_; | 171 std::string cookies_; |
172 | 172 |
173 // Java MediaPlayerBridge instance. | 173 // Java MediaPlayerBridge instance. |
174 base::android::ScopedJavaGlobalRef<jobject> j_media_player_bridge_; | 174 base::android::ScopedJavaGlobalRef<jobject> j_media_player_bridge_; |
175 | 175 |
176 base::RepeatingTimer<MediaPlayerBridge> time_update_timer_; | 176 base::RepeatingTimer<MediaPlayerBridge> time_update_timer_; |
177 | 177 |
178 // Volume of playback. | 178 // Initial playback volume |
179 double volume_; | 179 double initial_volume_; |
qinmin
2015/02/04 03:27:54
why we need 2 volumes? I think java and native sho
Tima Vaisburd
2015/02/04 17:39:01
I noticed that original code did not maintain the
qinmin
2015/02/04 19:16:16
That looks like a bug to me. Although the first se
Tima Vaisburd
2015/02/05 23:22:27
Simplified SetVolume() the same way AudioDecoderJo
| |
180 | |
181 // Current playback volume that has been passed to Java | |
182 double current_volume_; | |
180 | 183 |
181 // Whether user credentials are allowed to be passed. | 184 // Whether user credentials are allowed to be passed. |
182 bool allow_credentials_; | 185 bool allow_credentials_; |
183 | 186 |
184 // NOTE: Weak pointers must be invalidated before all other member variables. | 187 // NOTE: Weak pointers must be invalidated before all other member variables. |
185 base::WeakPtrFactory<MediaPlayerBridge> weak_factory_; | 188 base::WeakPtrFactory<MediaPlayerBridge> weak_factory_; |
186 | 189 |
187 DISALLOW_COPY_AND_ASSIGN(MediaPlayerBridge); | 190 DISALLOW_COPY_AND_ASSIGN(MediaPlayerBridge); |
188 }; | 191 }; |
189 | 192 |
190 } // namespace media | 193 } // namespace media |
191 | 194 |
192 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_BRIDGE_H_ | 195 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_BRIDGE_H_ |
OLD | NEW |