OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 WEBKIT_MEDIA_WEBMEDIAPLAYER_PROXY_H_ | 5 #ifndef WEBKIT_MEDIA_WEBMEDIAPLAYER_PROXY_H_ |
6 #define WEBKIT_MEDIA_WEBMEDIAPLAYER_PROXY_H_ | 6 #define WEBKIT_MEDIA_WEBMEDIAPLAYER_PROXY_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 const std::string& session_id, | 78 const std::string& session_id, |
79 media::Decryptor::KeyError error_code, | 79 media::Decryptor::KeyError error_code, |
80 int system_code) OVERRIDE; | 80 int system_code) OVERRIDE; |
81 virtual void KeyMessage(const std::string& key_system, | 81 virtual void KeyMessage(const std::string& key_system, |
82 const std::string& session_id, | 82 const std::string& session_id, |
83 scoped_array<uint8> message, | 83 scoped_array<uint8> message, |
84 int message_length, | 84 int message_length, |
85 const std::string& default_url) OVERRIDE; | 85 const std::string& default_url) OVERRIDE; |
86 virtual void NeedKey(const std::string& key_system, | 86 virtual void NeedKey(const std::string& key_system, |
87 const std::string& session_id, | 87 const std::string& session_id, |
| 88 const std::string& type, |
88 scoped_array<uint8> init_data, | 89 scoped_array<uint8> init_data, |
89 int init_data_size) OVERRIDE; | 90 int init_data_size) OVERRIDE; |
90 | 91 |
91 private: | 92 private: |
92 friend class base::RefCountedThreadSafe<WebMediaPlayerProxy>; | 93 friend class base::RefCountedThreadSafe<WebMediaPlayerProxy>; |
93 virtual ~WebMediaPlayerProxy(); | 94 virtual ~WebMediaPlayerProxy(); |
94 | 95 |
95 // Invoke |webmediaplayer_| to perform a repaint. | 96 // Invoke |webmediaplayer_| to perform a repaint. |
96 void RepaintTask(); | 97 void RepaintTask(); |
97 | 98 |
(...skipping 10 matching lines...) Expand all Loading... |
108 // Notify |webmediaplayer_| that a key message has been generated. | 109 // Notify |webmediaplayer_| that a key message has been generated. |
109 void KeyMessageTask(const std::string& key_system, | 110 void KeyMessageTask(const std::string& key_system, |
110 const std::string& session_id, | 111 const std::string& session_id, |
111 scoped_array<uint8> message, | 112 scoped_array<uint8> message, |
112 int message_length, | 113 int message_length, |
113 const std::string& default_url); | 114 const std::string& default_url); |
114 | 115 |
115 // Notify |webmediaplayer_| that a key is needed for decryption. | 116 // Notify |webmediaplayer_| that a key is needed for decryption. |
116 void NeedKeyTask(const std::string& key_system, | 117 void NeedKeyTask(const std::string& key_system, |
117 const std::string& session_id, | 118 const std::string& session_id, |
| 119 const std::string& type, |
118 scoped_array<uint8> init_data, | 120 scoped_array<uint8> init_data, |
119 int init_data_size); | 121 int init_data_size); |
120 | 122 |
121 // The render message loop where WebKit lives. | 123 // The render message loop where WebKit lives. |
122 scoped_refptr<base::MessageLoopProxy> render_loop_; | 124 scoped_refptr<base::MessageLoopProxy> render_loop_; |
123 WebMediaPlayerImpl* webmediaplayer_; | 125 WebMediaPlayerImpl* webmediaplayer_; |
124 | 126 |
125 scoped_refptr<BufferedDataSource> data_source_; | 127 scoped_refptr<BufferedDataSource> data_source_; |
126 scoped_refptr<media::VideoRendererBase> frame_provider_; | 128 scoped_refptr<media::VideoRendererBase> frame_provider_; |
127 media::SkCanvasVideoRenderer video_renderer_; | 129 media::SkCanvasVideoRenderer video_renderer_; |
128 | 130 |
129 base::Lock lock_; | 131 base::Lock lock_; |
130 int outstanding_repaints_; | 132 int outstanding_repaints_; |
131 | 133 |
132 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerProxy); | 134 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerProxy); |
133 }; | 135 }; |
134 | 136 |
135 } // namespace webkit_media | 137 } // namespace webkit_media |
136 | 138 |
137 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_PROXY_H_ | 139 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_PROXY_H_ |
OLD | NEW |