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

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

Issue 405663002: Support basic authentication for html5 media (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updating crbug Created 6 years, 5 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
OLDNEW
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>
11 11
12 #include "base/android/scoped_java_ref.h" 12 #include "base/android/scoped_java_ref.h"
13 #include "base/callback.h" 13 #include "base/callback.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/strings/string16.h"
16 #include "base/time/time.h" 17 #include "base/time/time.h"
17 #include "base/timer/timer.h" 18 #include "base/timer/timer.h"
18 #include "media/base/android/media_player_android.h" 19 #include "media/base/android/media_player_android.h"
19 #include "media/base/android/media_player_listener.h" 20 #include "media/base/android/media_player_listener.h"
20 #include "url/gurl.h" 21 #include "url/gurl.h"
21 22
22 namespace media { 23 namespace media {
23 24
24 class MediaPlayerManager; 25 class MediaPlayerManager;
25 26
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 // Called when |time_update_timer_| fires. 120 // Called when |time_update_timer_| fires.
120 void OnTimeUpdateTimerFired(); 121 void OnTimeUpdateTimerFired();
121 122
122 // Update allowed operations from the player. 123 // Update allowed operations from the player.
123 void UpdateAllowedOperations(); 124 void UpdateAllowedOperations();
124 125
125 // Callback function passed to |resource_getter_|. Called when the cookies 126 // Callback function passed to |resource_getter_|. Called when the cookies
126 // are retrieved. 127 // are retrieved.
127 void OnCookiesRetrieved(const std::string& cookies); 128 void OnCookiesRetrieved(const std::string& cookies);
128 129
130 // Callback function passed to |resource_getter_|. Called when the auth
131 // credentials are retrieved.
132 void OnAuthCredentialsRetrieved(
133 const base::string16& username, const base::string16& password);
134
129 // Extract the media metadata from a url, asynchronously. 135 // Extract the media metadata from a url, asynchronously.
130 // OnMediaMetadataExtracted() will be called when this call finishes. 136 // OnMediaMetadataExtracted() will be called when this call finishes.
131 void ExtractMediaMetadata(const std::string& url); 137 void ExtractMediaMetadata(const std::string& url);
132 void OnMediaMetadataExtracted(base::TimeDelta duration, int width, int height, 138 void OnMediaMetadataExtracted(base::TimeDelta duration, int width, int height,
133 bool success); 139 bool success);
134 140
135 // Whether the player is prepared for playback. 141 // Whether the player is prepared for playback.
136 bool prepared_; 142 bool prepared_;
137 143
138 // Pending play event while player is preparing. 144 // Pending play event while player is preparing.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 // Weak pointer passed to |listener_| for callbacks. 189 // Weak pointer passed to |listener_| for callbacks.
184 // NOTE: Weak pointers must be invalidated before all other member variables. 190 // NOTE: Weak pointers must be invalidated before all other member variables.
185 base::WeakPtrFactory<MediaPlayerBridge> weak_factory_; 191 base::WeakPtrFactory<MediaPlayerBridge> weak_factory_;
186 192
187 DISALLOW_COPY_AND_ASSIGN(MediaPlayerBridge); 193 DISALLOW_COPY_AND_ASSIGN(MediaPlayerBridge);
188 }; 194 };
189 195
190 } // namespace media 196 } // namespace media
191 197
192 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_BRIDGE_H_ 198 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_BRIDGE_H_
OLDNEW
« no previous file with comments | « content/renderer/media/android/webmediaplayer_android.cc ('k') | media/base/android/media_player_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698