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

Side by Side Diff: ppapi/proxy/ppp_content_decryptor_private_proxy.cc

Issue 11091005: Update PluginInstance for decrypt-and-decode video. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix a bug in ppp_content_decryptor_private_proxy.cc Created 8 years, 2 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
« no previous file with comments | « ppapi/cpp/private/content_decryptor_private.h ('k') | webkit/media/crypto/ppapi/cdm_wrapper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ppapi/proxy/ppp_content_decryptor_private_proxy.h" 5 #include "ppapi/proxy/ppp_content_decryptor_private_proxy.h"
6 6
7 #include "base/platform_file.h" 7 #include "base/platform_file.h"
8 #include "ppapi/c/pp_bool.h" 8 #include "ppapi/c/pp_bool.h"
9 #include "ppapi/c/ppb_core.h" 9 #include "ppapi/c/ppb_core.h"
10 #include "ppapi/proxy/content_decryptor_private_serializer.h" 10 #include "ppapi/proxy/content_decryptor_private_serializer.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 bool InitializePppDecryptorBuffer(PP_Instance instance, 94 bool InitializePppDecryptorBuffer(PP_Instance instance,
95 HostDispatcher* dispatcher, 95 HostDispatcher* dispatcher,
96 PP_Resource resource, 96 PP_Resource resource,
97 PPPDecryptor_Buffer* buffer) { 97 PPPDecryptor_Buffer* buffer) {
98 if (!buffer) { 98 if (!buffer) {
99 NOTREACHED(); 99 NOTREACHED();
100 return false; 100 return false;
101 } 101 }
102 102
103 if (resource == 0) {
104 buffer->resource = HostResource();
105 buffer->handle = base::SharedMemoryHandle();
106 buffer->size = 0;
107 return true;
108 }
109
xhwang 2012/10/18 01:17:04 Sorry for the rebase noise. Add this line since th
103 if (!AddRefResourceForPlugin(dispatcher, resource)) 110 if (!AddRefResourceForPlugin(dispatcher, resource))
104 return false; 111 return false;
105 112
106 HostResource host_resource; 113 HostResource host_resource;
107 host_resource.SetHostResource(instance, resource); 114 host_resource.SetHostResource(instance, resource);
108 115
109 uint32_t size = 0; 116 uint32_t size = 0;
110 if (DescribeHostBufferResource(resource, &size) == PP_FALSE) 117 if (DescribeHostBufferResource(resource, &size) == PP_FALSE)
111 return false; 118 return false;
112 119
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 ppp_decryptor_impl_->DecryptAndDecode, 496 ppp_decryptor_impl_->DecryptAndDecode,
490 instance, 497 instance,
491 decoder_type, 498 decoder_type,
492 plugin_resource, 499 plugin_resource,
493 const_cast<const PP_EncryptedBlockInfo*>(&block_info)); 500 const_cast<const PP_EncryptedBlockInfo*>(&block_info));
494 } 501 }
495 } 502 }
496 503
497 } // namespace proxy 504 } // namespace proxy
498 } // namespace ppapi 505 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/cpp/private/content_decryptor_private.h ('k') | webkit/media/crypto/ppapi/cdm_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698