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

Side by Side Diff: content/renderer/media/android/webmediaplayer_android.h

Issue 416333011: Allow setContentDecryptionModule() to get called when setting is done. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase + android tweaks 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
« no previous file with comments | « no previous file | content/renderer/media/android/webmediaplayer_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 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 CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
6 #define CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 6 #define CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 22 matching lines...) Expand all
33 #include "third_party/skia/include/gpu/GrContext.h" 33 #include "third_party/skia/include/gpu/GrContext.h"
34 #include "third_party/skia/include/gpu/SkGrPixelRef.h" 34 #include "third_party/skia/include/gpu/SkGrPixelRef.h"
35 #include "ui/gfx/rect_f.h" 35 #include "ui/gfx/rect_f.h"
36 36
37 namespace base { 37 namespace base {
38 class MessageLoopProxy; 38 class MessageLoopProxy;
39 } 39 }
40 40
41 namespace blink { 41 namespace blink {
42 class WebContentDecryptionModule; 42 class WebContentDecryptionModule;
43 class WebContentDecryptionModuleResult;
43 class WebFrame; 44 class WebFrame;
44 class WebURL; 45 class WebURL;
45 } 46 }
46 47
47 namespace gpu { 48 namespace gpu {
48 struct MailboxHolder; 49 struct MailboxHolder;
49 } 50 }
50 51
51 namespace media { 52 namespace media {
52 class MediaLog; 53 class MediaLog;
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 virtual MediaKeyException addKey( 213 virtual MediaKeyException addKey(
213 const blink::WebString& key_system, 214 const blink::WebString& key_system,
214 const unsigned char* key, 215 const unsigned char* key,
215 unsigned key_length, 216 unsigned key_length,
216 const unsigned char* init_data, 217 const unsigned char* init_data,
217 unsigned init_data_length, 218 unsigned init_data_length,
218 const blink::WebString& session_id); 219 const blink::WebString& session_id);
219 virtual MediaKeyException cancelKeyRequest( 220 virtual MediaKeyException cancelKeyRequest(
220 const blink::WebString& key_system, 221 const blink::WebString& key_system,
221 const blink::WebString& session_id); 222 const blink::WebString& session_id);
223 // TODO(jrummell): Remove this method once Blink updated to use the other
224 // two methods.
222 virtual void setContentDecryptionModule( 225 virtual void setContentDecryptionModule(
223 blink::WebContentDecryptionModule* cdm); 226 blink::WebContentDecryptionModule* cdm);
227 virtual void setContentDecryptionModule(
228 blink::WebContentDecryptionModule* cdm,
229 blink::WebContentDecryptionModuleResult result);
230 virtual void setContentDecryptionModuleSync(
231 blink::WebContentDecryptionModule* cdm);
224 232
225 void OnKeyAdded(const std::string& session_id); 233 void OnKeyAdded(const std::string& session_id);
226 void OnKeyError(const std::string& session_id, 234 void OnKeyError(const std::string& session_id,
227 media::MediaKeys::KeyError error_code, 235 media::MediaKeys::KeyError error_code,
228 uint32 system_code); 236 uint32 system_code);
229 void OnKeyMessage(const std::string& session_id, 237 void OnKeyMessage(const std::string& session_id,
230 const std::vector<uint8>& message, 238 const std::vector<uint8>& message,
231 const GURL& destination_url); 239 const GURL& destination_url);
232 240
233 void OnMediaSourceOpened(blink::WebMediaSource* web_media_source); 241 void OnMediaSourceOpened(blink::WebMediaSource* web_media_source);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 const std::string& session_id); 291 const std::string& session_id);
284 MediaKeyException CancelKeyRequestInternal(const std::string& key_system, 292 MediaKeyException CancelKeyRequestInternal(const std::string& key_system,
285 const std::string& session_id); 293 const std::string& session_id);
286 294
287 // Requests that this object notifies when a decryptor is ready through the 295 // Requests that this object notifies when a decryptor is ready through the
288 // |decryptor_ready_cb| provided. 296 // |decryptor_ready_cb| provided.
289 // If |decryptor_ready_cb| is null, the existing callback will be fired with 297 // If |decryptor_ready_cb| is null, the existing callback will be fired with
290 // NULL immediately and reset. 298 // NULL immediately and reset.
291 void SetDecryptorReadyCB(const media::DecryptorReadyCB& decryptor_ready_cb); 299 void SetDecryptorReadyCB(const media::DecryptorReadyCB& decryptor_ready_cb);
292 300
301 // Called when the ContentDecryptionModule has been attached to the
302 // pipeline/decoders.
303 void ContentDecryptionModuleAttached(
304 blink::WebContentDecryptionModuleResult result,
305 bool success);
306
293 bool EnsureTextureBackedSkBitmap(GrContext* gr, SkBitmap& bitmap, 307 bool EnsureTextureBackedSkBitmap(GrContext* gr, SkBitmap& bitmap,
294 const blink::WebSize& size, 308 const blink::WebSize& size,
295 GrSurfaceOrigin origin, 309 GrSurfaceOrigin origin,
296 GrPixelConfig config); 310 GrPixelConfig config);
297 311
298 blink::WebFrame* const frame_; 312 blink::WebFrame* const frame_;
299 313
300 blink::WebMediaPlayerClient* const client_; 314 blink::WebMediaPlayerClient* const client_;
301 315
302 // |delegate_| is used to notify the browser process of the player status, so 316 // |delegate_| is used to notify the browser process of the player status, so
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 475
462 // NOTE: Weak pointers must be invalidated before all other member variables. 476 // NOTE: Weak pointers must be invalidated before all other member variables.
463 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; 477 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_;
464 478
465 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); 479 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid);
466 }; 480 };
467 481
468 } // namespace content 482 } // namespace content
469 483
470 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 484 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/android/webmediaplayer_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698