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

Side by Side Diff: webkit/plugins/ppapi/ppapi_plugin_instance.cc

Issue 11313016: Add "type" in GenerateKeyRequest() and OnNeedKey(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments resolved Created 8 years, 1 month 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/ppapi_plugin_instance.h" 5 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1588 matching lines...) Expand 10 before | Expand all | Expand 10 after
1599 plugin_pdf_interface_->Transform(pp_instance(), transform_type); 1599 plugin_pdf_interface_->Transform(pp_instance(), transform_type);
1600 // NOTE: plugin instance may have been deleted. 1600 // NOTE: plugin instance may have been deleted.
1601 } 1601 }
1602 1602
1603 void PluginInstance::set_decrypt_client( 1603 void PluginInstance::set_decrypt_client(
1604 media::DecryptorClient* decryptor_client) { 1604 media::DecryptorClient* decryptor_client) {
1605 decryptor_client_ = decryptor_client; 1605 decryptor_client_ = decryptor_client;
1606 } 1606 }
1607 1607
1608 bool PluginInstance::GenerateKeyRequest(const std::string& key_system, 1608 bool PluginInstance::GenerateKeyRequest(const std::string& key_system,
1609 const std::string& type,
1609 const std::string& init_data) { 1610 const std::string& init_data) {
1610 if (!LoadContentDecryptorInterface()) 1611 if (!LoadContentDecryptorInterface())
1611 return false; 1612 return false;
1612 if (key_system.empty()) 1613 if (key_system.empty())
1613 return false; 1614 return false;
1614 1615
1615 PP_Var init_data_array = 1616 PP_Var init_data_array =
1616 PpapiGlobals::Get()->GetVarTracker()->MakeArrayBufferPPVar( 1617 PpapiGlobals::Get()->GetVarTracker()->MakeArrayBufferPPVar(
1617 init_data.size(), init_data.data()); 1618 init_data.size(), init_data.data());
1618 1619
1620 // TODO(tomfinegan): Pass "type" once PPP_ContentDecryptor_Private is updated.
1619 plugin_decryption_interface_->GenerateKeyRequest( 1621 plugin_decryption_interface_->GenerateKeyRequest(
1620 pp_instance(), 1622 pp_instance(),
1621 StringVar::StringToPPVar(key_system), 1623 StringVar::StringToPPVar(key_system),
1622 init_data_array); 1624 init_data_array);
1623 return true; 1625 return true;
1624 } 1626 }
1625 1627
1626 bool PluginInstance::AddKey(const std::string& session_id, 1628 bool PluginInstance::AddKey(const std::string& session_id,
1627 const std::string& key, 1629 const std::string& key,
1628 const std::string& init_data) { 1630 const std::string& init_data) {
(...skipping 1579 matching lines...) Expand 10 before | Expand all | Expand 10 after
3208 screen_size_for_fullscreen_ = gfx::Size(); 3210 screen_size_for_fullscreen_ = gfx::Size();
3209 WebElement element = container_->element(); 3211 WebElement element = container_->element();
3210 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); 3212 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_);
3211 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); 3213 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_);
3212 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); 3214 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_);
3213 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); 3215 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_);
3214 } 3216 }
3215 3217
3216 } // namespace ppapi 3218 } // namespace ppapi
3217 } // namespace webkit 3219 } // namespace webkit
OLDNEW
« media/mp4/mp4_stream_parser_unittest.cc ('K') | « 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