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

Unified Diff: webkit/plugins/ppapi/ppapi_plugin_instance.cc

Issue 10928098: Return void from all PPP CDM API interface methods (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppapi_plugin_instance.cc
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index b80f0ff3c80f8462805384809375d8916ea126f1..e3ec314cc510eff6b5fbc357057f983752dc2cbd 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -1453,28 +1453,28 @@ void PluginInstance::set_decrypt_client(
decryptor_client_ = decryptor_client;
}
-bool PluginInstance::GenerateKeyRequest(const std::string& key_system,
+void PluginInstance::GenerateKeyRequest(const std::string& key_system,
const std::string& init_data) {
if (!LoadContentDecryptorInterface())
- return false;
+ return;
if (key_system.empty())
- return false;
+ return;
dmichael (off chromium) 2012/09/11 15:59:17 At this level, I think it's up to you guys what yo
Tom Finegan 2012/09/11 16:49:24 Done.
PP_Var init_data_array =
PpapiGlobals::Get()->GetVarTracker()->MakeArrayBufferPPVar(
init_data.size(), init_data.data());
- return PP_ToBool(plugin_decryption_interface_->GenerateKeyRequest(
+ plugin_decryption_interface_->GenerateKeyRequest(
pp_instance(),
StringVar::StringToPPVar(key_system),
- init_data_array));
+ init_data_array);
}
-bool PluginInstance::AddKey(const std::string& session_id,
+void PluginInstance::AddKey(const std::string& session_id,
const std::string& key,
const std::string& init_data) {
if (!LoadContentDecryptorInterface())
- return false;
+ return;
PP_Var key_array =
PpapiGlobals::Get()->GetVarTracker()->MakeArrayBufferPPVar(key.size(),
key.data());
@@ -1483,27 +1483,27 @@ bool PluginInstance::AddKey(const std::string& session_id,
init_data.size(),
init_data.data());
- return PP_ToBool(plugin_decryption_interface_->AddKey(
+ plugin_decryption_interface_->AddKey(
pp_instance(),
StringVar::StringToPPVar(session_id),
key_array,
- init_data_array));
+ init_data_array);
}
-bool PluginInstance::CancelKeyRequest(const std::string& session_id) {
+void PluginInstance::CancelKeyRequest(const std::string& session_id) {
if (!LoadContentDecryptorInterface())
- return false;
+ return;
- return PP_ToBool(plugin_decryption_interface_->CancelKeyRequest(
+ plugin_decryption_interface_->CancelKeyRequest(
pp_instance(),
- StringVar::StringToPPVar(session_id)));
+ StringVar::StringToPPVar(session_id));
}
-bool PluginInstance::Decrypt(
+void PluginInstance::Decrypt(
const scoped_refptr<media::DecoderBuffer>& encrypted_buffer,
const media::Decryptor::DecryptCB& decrypt_cb) {
if (!LoadContentDecryptorInterface())
- return false;
+ return;
ScopedPPResource encrypted_resource(
ScopedPPResource::PassRef(),
@@ -1511,7 +1511,7 @@ bool PluginInstance::Decrypt(
encrypted_buffer->GetData(),
encrypted_buffer->GetDataSize()));
if (!encrypted_resource.get())
- return false;
+ return;
uint32_t request_id = next_decryption_request_id_++;
@@ -1521,37 +1521,36 @@ bool PluginInstance::Decrypt(
encrypted_buffer->GetTimestamp().InMicroseconds(),
request_id,
&block_info)) {
- return false;
+ return;
}
DCHECK(!ContainsKey(pending_decryption_cbs_, request_id));
pending_decryption_cbs_.insert(std::make_pair(request_id, decrypt_cb));
- return PP_ToBool(plugin_decryption_interface_->Decrypt(pp_instance(),
- encrypted_resource,
- &block_info));
+ plugin_decryption_interface_->Decrypt(pp_instance(),
+ encrypted_resource,
+ &block_info);
}
-bool PluginInstance::DecryptAndDecode(
+void PluginInstance::DecryptAndDecode(
const scoped_refptr<media::DecoderBuffer>& encrypted_buffer,
const media::Decryptor::DecryptCB& decrypt_cb) {
if (!LoadContentDecryptorInterface())
- return false;
+ return;
ScopedPPResource encrypted_resource(MakeBufferResource(
pp_instance(),
encrypted_buffer->GetData(),
encrypted_buffer->GetDataSize()));
if (!encrypted_resource.get())
- return false;
+ return;
PP_EncryptedBlockInfo block_info;
// TODO(tomfinegan): Store callback and ID in a map, and pass ID to decryptor.
- return PP_ToBool(
- plugin_decryption_interface_->DecryptAndDecode(pp_instance(),
- encrypted_resource,
- &block_info));
+ plugin_decryption_interface_->DecryptAndDecode(pp_instance(),
+ encrypted_resource,
+ &block_info);
}
bool PluginInstance::FlashIsFullscreenOrPending() {
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698