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

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

Issue 408873004: Fix for cross-origin video check for webgl on android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix clang warnings Created 6 years, 4 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>
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // decoding. MediaPlayerBridge also forwards Android MediaPlayer callbacks to 44 // decoding. MediaPlayerBridge also forwards Android MediaPlayer callbacks to
45 // the |manager| when needed. 45 // the |manager| when needed.
46 MediaPlayerBridge(int player_id, 46 MediaPlayerBridge(int player_id,
47 const GURL& url, 47 const GURL& url,
48 const GURL& first_party_for_cookies, 48 const GURL& first_party_for_cookies,
49 const std::string& user_agent, 49 const std::string& user_agent,
50 bool hide_url_log, 50 bool hide_url_log,
51 MediaPlayerManager* manager, 51 MediaPlayerManager* manager,
52 const RequestMediaResourcesCB& request_media_resources_cb, 52 const RequestMediaResourcesCB& request_media_resources_cb,
53 const ReleaseMediaResourcesCB& release_media_resources_cb, 53 const ReleaseMediaResourcesCB& release_media_resources_cb,
54 const GURL& frame_url); 54 const GURL& frame_url,
55 bool allow_credentials);
55 virtual ~MediaPlayerBridge(); 56 virtual ~MediaPlayerBridge();
56 57
57 // Initialize this object and extract the metadata from the media. 58 // Initialize this object and extract the metadata from the media.
58 virtual void Initialize(); 59 virtual void Initialize();
59 60
60 // MediaPlayerAndroid implementation. 61 // MediaPlayerAndroid implementation.
61 virtual void SetVideoSurface(gfx::ScopedJavaSurface surface) OVERRIDE; 62 virtual void SetVideoSurface(gfx::ScopedJavaSurface surface) OVERRIDE;
62 virtual void Start() OVERRIDE; 63 virtual void Start() OVERRIDE;
63 virtual void Pause(bool is_media_related_action ALLOW_UNUSED) OVERRIDE; 64 virtual void Pause(bool is_media_related_action ALLOW_UNUSED) OVERRIDE;
64 virtual void SeekTo(base::TimeDelta timestamp) OVERRIDE; 65 virtual void SeekTo(base::TimeDelta timestamp) OVERRIDE;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 185
185 // Listener object that listens to all the media player events. 186 // Listener object that listens to all the media player events.
186 scoped_ptr<MediaPlayerListener> listener_; 187 scoped_ptr<MediaPlayerListener> listener_;
187 188
188 // Whether player is currently using a surface. 189 // Whether player is currently using a surface.
189 bool is_surface_in_use_; 190 bool is_surface_in_use_;
190 191
191 // Volume of playback. 192 // Volume of playback.
192 double volume_; 193 double volume_;
193 194
195 // Whether user credentials are allowed to be passed.
196 bool allow_credentials_;
197
194 // Weak pointer passed to |listener_| for callbacks. 198 // Weak pointer passed to |listener_| for callbacks.
195 // NOTE: Weak pointers must be invalidated before all other member variables. 199 // NOTE: Weak pointers must be invalidated before all other member variables.
196 base::WeakPtrFactory<MediaPlayerBridge> weak_factory_; 200 base::WeakPtrFactory<MediaPlayerBridge> weak_factory_;
197 201
198 DISALLOW_COPY_AND_ASSIGN(MediaPlayerBridge); 202 DISALLOW_COPY_AND_ASSIGN(MediaPlayerBridge);
199 }; 203 };
200 204
201 } // namespace media 205 } // namespace media
202 206
203 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_BRIDGE_H_ 207 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698