OLD | NEW |
| (Empty) |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef WEBKIT_RENDERER_MEDIA_ANDROID_PROXY_MEDIA_KEYS_H_ | |
6 #define WEBKIT_RENDERER_MEDIA_ANDROID_PROXY_MEDIA_KEYS_H_ | |
7 | |
8 #include "base/basictypes.h" | |
9 #include "media/base/media_keys.h" | |
10 | |
11 namespace webkit_media { | |
12 | |
13 class WebMediaPlayerProxyAndroid; | |
14 | |
15 // MediaKeys wrapper of the WebMediaPlayerProxyAndroid. | |
16 // TODO(xhwang): Remove |player_id| from WebMediaPlayerProxyAndroid, make | |
17 // WebMediaPlayerProxyAndroid a subclass of media::MediaKeys, then remove this | |
18 // class! | |
19 class ProxyMediaKeys : public media::MediaKeys { | |
20 public: | |
21 ProxyMediaKeys(WebMediaPlayerProxyAndroid* proxy, int media_keys_id); | |
22 | |
23 // MediaKeys implementation. | |
24 virtual bool GenerateKeyRequest(const std::string& type, | |
25 const uint8* init_data, | |
26 int init_data_length) OVERRIDE; | |
27 virtual void AddKey(const uint8* key, int key_length, | |
28 const uint8* init_data, int init_data_length, | |
29 const std::string& session_id) OVERRIDE; | |
30 virtual void CancelKeyRequest(const std::string& session_id) OVERRIDE; | |
31 | |
32 private: | |
33 WebMediaPlayerProxyAndroid* proxy_; | |
34 int media_keys_id_; | |
35 | |
36 DISALLOW_COPY_AND_ASSIGN (ProxyMediaKeys); | |
37 }; | |
38 | |
39 } // namespace webkit_media | |
40 | |
41 #endif // WEBKIT_RENDERER_MEDIA_ANDROID_PROXY_MEDIA_KEYS_H_ | |
OLD | NEW |