| OLD | NEW |
| 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 #include "webkit/renderer/media/android/webmediaplayer_android.h" | 5 #include "webkit/renderer/media/android/webmediaplayer_android.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 if (manager_) | 78 if (manager_) |
| 79 player_id_ = manager_->RegisterMediaPlayer(this); | 79 player_id_ = manager_->RegisterMediaPlayer(this); |
| 80 | 80 |
| 81 if (stream_texture_factory_) { | 81 if (stream_texture_factory_) { |
| 82 stream_texture_proxy_.reset(stream_texture_factory_->CreateProxy()); | 82 stream_texture_proxy_.reset(stream_texture_factory_->CreateProxy()); |
| 83 stream_id_ = stream_texture_factory_->CreateStreamTexture(&texture_id_); | 83 stream_id_ = stream_texture_factory_->CreateStreamTexture(&texture_id_); |
| 84 ReallocateVideoFrame(); | 84 ReallocateVideoFrame(); |
| 85 } | 85 } |
| 86 | 86 |
| 87 #if defined(GOOGLE_TV) | 87 #if defined(GOOGLE_TV) |
| 88 if (WebKit::WebRuntimeFeatures::isEncryptedMediaEnabled()) { | 88 if (WebKit::WebRuntimeFeatures::isLegacyEncryptedMediaEnabled()) { |
| 89 // |decryptor_| is owned, so Unretained() is safe here. | 89 // |decryptor_| is owned, so Unretained() is safe here. |
| 90 decryptor_.reset(new ProxyDecryptor( | 90 decryptor_.reset(new ProxyDecryptor( |
| 91 client, | 91 client, |
| 92 frame, | 92 frame, |
| 93 base::Bind(&WebMediaPlayerAndroid::OnKeyAdded, base::Unretained(this)), | 93 base::Bind(&WebMediaPlayerAndroid::OnKeyAdded, base::Unretained(this)), |
| 94 base::Bind(&WebMediaPlayerAndroid::OnKeyError, base::Unretained(this)), | 94 base::Bind(&WebMediaPlayerAndroid::OnKeyError, base::Unretained(this)), |
| 95 base::Bind(&WebMediaPlayerAndroid::OnKeyMessage, | 95 base::Bind(&WebMediaPlayerAndroid::OnKeyMessage, |
| 96 base::Unretained(this)), | 96 base::Unretained(this)), |
| 97 base::Bind(&WebMediaPlayerAndroid::OnNeedKey, base::Unretained(this)))); | 97 base::Bind(&WebMediaPlayerAndroid::OnNeedKey, base::Unretained(this)))); |
| 98 } | 98 } |
| (...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 960 void WebMediaPlayerAndroid::exitFullscreen() { | 960 void WebMediaPlayerAndroid::exitFullscreen() { |
| 961 if (proxy_) | 961 if (proxy_) |
| 962 proxy_->ExitFullscreen(player_id_); | 962 proxy_->ExitFullscreen(player_id_); |
| 963 } | 963 } |
| 964 | 964 |
| 965 bool WebMediaPlayerAndroid::canEnterFullscreen() const { | 965 bool WebMediaPlayerAndroid::canEnterFullscreen() const { |
| 966 return manager_->CanEnterFullscreen(frame_); | 966 return manager_->CanEnterFullscreen(frame_); |
| 967 } | 967 } |
| 968 | 968 |
| 969 } // namespace webkit_media | 969 } // namespace webkit_media |
| OLD | NEW |