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

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

Issue 759933003: Move OnNeedKey() to WebMediaPlayerImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 6 years 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_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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 void OnKeyAdded(const std::string& session_id); 247 void OnKeyAdded(const std::string& session_id);
248 void OnKeyError(const std::string& session_id, 248 void OnKeyError(const std::string& session_id,
249 media::MediaKeys::KeyError error_code, 249 media::MediaKeys::KeyError error_code,
250 uint32 system_code); 250 uint32 system_code);
251 void OnKeyMessage(const std::string& session_id, 251 void OnKeyMessage(const std::string& session_id,
252 const std::vector<uint8>& message, 252 const std::vector<uint8>& message,
253 const GURL& destination_url); 253 const GURL& destination_url);
254 254
255 void OnMediaSourceOpened(blink::WebMediaSource* web_media_source); 255 void OnMediaSourceOpened(blink::WebMediaSource* web_media_source);
256 256
257 void OnNeedKey(const std::string& type, 257 void OnNeedKey(const std::string& init_data_type,
258 const std::vector<uint8>& init_data); 258 const std::vector<uint8>& init_data);
259 259
260 // TODO(xhwang): Implement WebMediaPlayer::setContentDecryptionModule().
261 // See: http://crbug.com/224786
262
263 protected: 260 protected:
264 // Helper method to update the playing state. 261 // Helper method to update the playing state.
265 void UpdatePlayingState(bool is_playing_); 262 void UpdatePlayingState(bool is_playing_);
266 263
267 // Helper methods for posting task for setting states and update WebKit. 264 // Helper methods for posting task for setting states and update WebKit.
268 void UpdateNetworkState(blink::WebMediaPlayer::NetworkState state); 265 void UpdateNetworkState(blink::WebMediaPlayer::NetworkState state);
269 void UpdateReadyState(blink::WebMediaPlayer::ReadyState state); 266 void UpdateReadyState(blink::WebMediaPlayer::ReadyState state);
270 void TryCreateStreamTextureProxyIfNeeded(); 267 void TryCreateStreamTextureProxyIfNeeded();
271 void DoCreateStreamTexture(); 268 void DoCreateStreamTexture();
272 269
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 499
503 // NOTE: Weak pointers must be invalidated before all other member variables. 500 // NOTE: Weak pointers must be invalidated before all other member variables.
504 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; 501 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_;
505 502
506 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); 503 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid);
507 }; 504 };
508 505
509 } // namespace content 506 } // namespace content
510 507
511 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 508 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
OLDNEW
« no previous file with comments | « content/renderer/media/android/media_source_delegate.cc ('k') | content/renderer/media/android/webmediaplayer_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698