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

Side by Side Diff: content/renderer/media/webmediaplayer_impl.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: 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
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_WEBMEDIAPLAYER_IMPL_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_
6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ 6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 16 matching lines...) Expand all
27 #include "third_party/WebKit/public/platform/WebAudioSourceProvider.h" 27 #include "third_party/WebKit/public/platform/WebAudioSourceProvider.h"
28 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" 28 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
29 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" 29 #include "third_party/WebKit/public/platform/WebMediaPlayer.h"
30 #include "third_party/WebKit/public/platform/WebMediaPlayerClient.h" 30 #include "third_party/WebKit/public/platform/WebMediaPlayerClient.h"
31 #include "url/gurl.h" 31 #include "url/gurl.h"
32 32
33 class RenderAudioSourceProvider; 33 class RenderAudioSourceProvider;
34 34
35 namespace blink { 35 namespace blink {
36 class WebContentDecryptionModule; 36 class WebContentDecryptionModule;
37 class WebContentDecryptionModuleResult;
37 class WebLocalFrame; 38 class WebLocalFrame;
38 } 39 }
39 40
40 namespace base { 41 namespace base {
41 class MessageLoopProxy; 42 class MessageLoopProxy;
42 } 43 }
43 44
44 namespace media { 45 namespace media {
45 class ChunkDemuxer; 46 class ChunkDemuxer;
46 class GpuVideoAcceleratorFactories; 47 class GpuVideoAcceleratorFactories;
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 const unsigned char* init_data, 148 const unsigned char* init_data,
148 unsigned init_data_length, 149 unsigned init_data_length,
149 const blink::WebString& session_id); 150 const blink::WebString& session_id);
150 151
151 virtual MediaKeyException cancelKeyRequest( 152 virtual MediaKeyException cancelKeyRequest(
152 const blink::WebString& key_system, 153 const blink::WebString& key_system,
153 const blink::WebString& session_id); 154 const blink::WebString& session_id);
154 155
155 virtual void setContentDecryptionModule( 156 virtual void setContentDecryptionModule(
156 blink::WebContentDecryptionModule* cdm); 157 blink::WebContentDecryptionModule* cdm);
158 virtual void setContentDecryptionModule(
159 blink::WebContentDecryptionModule* cdm,
160 blink::WebContentDecryptionModuleResult result);
157 161
158 // Notifies blink that the entire media element region has been invalidated. 162 // Notifies blink that the entire media element region has been invalidated.
159 // This path is slower than notifying the compositor directly as it performs 163 // This path is slower than notifying the compositor directly as it performs
160 // more work and can trigger layouts. It should only be used in two cases: 164 // more work and can trigger layouts. It should only be used in two cases:
161 // 1) Major state changes (e.g., first frame available, run time error 165 // 1) Major state changes (e.g., first frame available, run time error
162 // occured) 166 // occured)
163 // 2) Compositing not available 167 // 2) Compositing not available
164 void InvalidateOnMainThread(); 168 void InvalidateOnMainThread();
165 169
166 void OnPipelineSeeked(bool time_changed, media::PipelineStatus status); 170 void OnPipelineSeeked(bool time_changed, media::PipelineStatus status);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 // Called by VideoRendererImpl on its internal thread with the new frame to be 234 // Called by VideoRendererImpl on its internal thread with the new frame to be
231 // painted. 235 // painted.
232 void FrameReady(const scoped_refptr<media::VideoFrame>& frame); 236 void FrameReady(const scoped_refptr<media::VideoFrame>& frame);
233 237
234 // Requests that this object notifies when a decryptor is ready through the 238 // Requests that this object notifies when a decryptor is ready through the
235 // |decryptor_ready_cb| provided. 239 // |decryptor_ready_cb| provided.
236 // If |decryptor_ready_cb| is null, the existing callback will be fired with 240 // If |decryptor_ready_cb| is null, the existing callback will be fired with
237 // NULL immediately and reset. 241 // NULL immediately and reset.
238 void SetDecryptorReadyCB(const media::DecryptorReadyCB& decryptor_ready_cb); 242 void SetDecryptorReadyCB(const media::DecryptorReadyCB& decryptor_ready_cb);
239 243
244 // Called when setContentDecryptionModule() completes.
245 void ContentDecryptionModuleSet(
246 blink::WebContentDecryptionModuleResult result);
247
240 // Returns the current video frame from |compositor_|. Blocks until the 248 // Returns the current video frame from |compositor_|. Blocks until the
241 // compositor can return the frame. 249 // compositor can return the frame.
242 scoped_refptr<media::VideoFrame> GetCurrentFrameFromCompositor(); 250 scoped_refptr<media::VideoFrame> GetCurrentFrameFromCompositor();
243 251
244 blink::WebLocalFrame* frame_; 252 blink::WebLocalFrame* frame_;
245 253
246 // TODO(hclam): get rid of these members and read from the pipeline directly. 254 // TODO(hclam): get rid of these members and read from the pipeline directly.
247 blink::WebMediaPlayer::NetworkState network_state_; 255 blink::WebMediaPlayer::NetworkState network_state_;
248 blink::WebMediaPlayer::ReadyState ready_state_; 256 blink::WebMediaPlayer::ReadyState ready_state_;
249 257
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 WebContentDecryptionModuleImpl* web_cdm_; 354 WebContentDecryptionModuleImpl* web_cdm_;
347 355
348 media::DecryptorReadyCB decryptor_ready_cb_; 356 media::DecryptorReadyCB decryptor_ready_cb_;
349 357
350 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 358 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
351 }; 359 };
352 360
353 } // namespace content 361 } // namespace content
354 362
355 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ 363 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/webmediaplayer_impl.cc » ('j') | content/renderer/media/webmediaplayer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698