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

Side by Side Diff: content/renderer/pepper/content_decryptor_delegate.cc

Issue 20165002: Move webkit/plugins/ppapi to content/renderer/pepper. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: more more clang fun Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
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 #include "webkit/plugins/ppapi/content_decryptor_delegate.h" 5 #include "content/renderer/pepper/content_decryptor_delegate.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "base/safe_numerics.h" 10 #include "base/safe_numerics.h"
11 #include "content/renderer/pepper/ppb_buffer_impl.h"
11 #include "media/base/audio_buffer.h" 12 #include "media/base/audio_buffer.h"
12 #include "media/base/audio_decoder_config.h" 13 #include "media/base/audio_decoder_config.h"
13 #include "media/base/bind_to_loop.h" 14 #include "media/base/bind_to_loop.h"
14 #include "media/base/channel_layout.h" 15 #include "media/base/channel_layout.h"
15 #include "media/base/data_buffer.h" 16 #include "media/base/data_buffer.h"
16 #include "media/base/decoder_buffer.h" 17 #include "media/base/decoder_buffer.h"
17 #include "media/base/decrypt_config.h" 18 #include "media/base/decrypt_config.h"
18 #include "media/base/video_decoder_config.h" 19 #include "media/base/video_decoder_config.h"
19 #include "media/base/video_frame.h" 20 #include "media/base/video_frame.h"
20 #include "media/base/video_util.h" 21 #include "media/base/video_util.h"
21 #include "ppapi/shared_impl/scoped_pp_resource.h" 22 #include "ppapi/shared_impl/scoped_pp_resource.h"
22 #include "ppapi/shared_impl/var.h" 23 #include "ppapi/shared_impl/var.h"
23 #include "ppapi/shared_impl/var_tracker.h" 24 #include "ppapi/shared_impl/var_tracker.h"
24 #include "ppapi/thunk/enter.h" 25 #include "ppapi/thunk/enter.h"
25 #include "ppapi/thunk/ppb_buffer_api.h" 26 #include "ppapi/thunk/ppb_buffer_api.h"
26 #include "ui/gfx/rect.h" 27 #include "ui/gfx/rect.h"
27 #include "webkit/plugins/ppapi/ppb_buffer_impl.h"
28 28
29 using ppapi::ArrayBufferVar; 29 using ppapi::ArrayBufferVar;
30 using ppapi::PpapiGlobals; 30 using ppapi::PpapiGlobals;
31 using ppapi::ScopedPPResource; 31 using ppapi::ScopedPPResource;
32 using ppapi::StringVar; 32 using ppapi::StringVar;
33 using ppapi::thunk::EnterResourceNoLock; 33 using ppapi::thunk::EnterResourceNoLock;
34 using ppapi::thunk::PPB_Buffer_API; 34 using ppapi::thunk::PPB_Buffer_API;
35 35
36 namespace webkit { 36 namespace webkit {
37 namespace ppapi { 37 namespace ppapi {
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 pending_audio_decode_request_id_(0), 234 pending_audio_decode_request_id_(0),
235 pending_video_decode_request_id_(0), 235 pending_video_decode_request_id_(0),
236 weak_ptr_factory_(this), 236 weak_ptr_factory_(this),
237 weak_this_(weak_ptr_factory_.GetWeakPtr()), 237 weak_this_(weak_ptr_factory_.GetWeakPtr()),
238 audio_sample_format_(media::kUnknownSampleFormat), 238 audio_sample_format_(media::kUnknownSampleFormat),
239 audio_samples_per_second_(0), 239 audio_samples_per_second_(0),
240 audio_channel_count_(0), 240 audio_channel_count_(0),
241 audio_bytes_per_frame_(0) { 241 audio_bytes_per_frame_(0) {
242 } 242 }
243 243
244 ContentDecryptorDelegate::~ContentDecryptorDelegate() {
245 }
246
244 void ContentDecryptorDelegate::Initialize(const std::string& key_system) { 247 void ContentDecryptorDelegate::Initialize(const std::string& key_system) {
245 // TODO(ddorwin): Add an Initialize method to PPP_ContentDecryptor_Private. 248 // TODO(ddorwin): Add an Initialize method to PPP_ContentDecryptor_Private.
246 DCHECK(!key_system.empty()); 249 DCHECK(!key_system.empty());
247 key_system_ = key_system; 250 key_system_ = key_system;
248 } 251 }
249 252
250 void ContentDecryptorDelegate::SetKeyEventCallbacks( 253 void ContentDecryptorDelegate::SetKeyEventCallbacks(
251 const media::KeyAddedCB& key_added_cb, 254 const media::KeyAddedCB& key_added_cb,
252 const media::KeyErrorCB& key_error_cb, 255 const media::KeyErrorCB& key_error_cb,
253 const media::KeyMessageCB& key_message_cb) { 256 const media::KeyMessageCB& key_message_cb) {
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 1042
1040 cur += frame_size; 1043 cur += frame_size;
1041 bytes_left -= frame_size; 1044 bytes_left -= frame_size;
1042 } while (bytes_left > 0); 1045 } while (bytes_left > 0);
1043 1046
1044 return true; 1047 return true;
1045 } 1048 }
1046 1049
1047 } // namespace ppapi 1050 } // namespace ppapi
1048 } // namespace webkit 1051 } // namespace webkit
OLDNEW
« no previous file with comments | « content/renderer/pepper/content_decryptor_delegate.h ('k') | content/renderer/pepper/event_conversion.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698