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 #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 1606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1617 plugin_pdf_interface_->Transform(pp_instance(), transform_type); | 1617 plugin_pdf_interface_->Transform(pp_instance(), transform_type); |
1618 // NOTE: plugin instance may have been deleted. | 1618 // NOTE: plugin instance may have been deleted. |
1619 } | 1619 } |
1620 | 1620 |
1621 void PluginInstance::set_decrypt_client( | 1621 void PluginInstance::set_decrypt_client( |
1622 media::DecryptorClient* decryptor_client) { | 1622 media::DecryptorClient* decryptor_client) { |
1623 decryptor_client_ = decryptor_client; | 1623 decryptor_client_ = decryptor_client; |
1624 } | 1624 } |
1625 | 1625 |
1626 bool PluginInstance::GenerateKeyRequest(const std::string& key_system, | 1626 bool PluginInstance::GenerateKeyRequest(const std::string& key_system, |
| 1627 const std::string& type, |
1627 const std::string& init_data) { | 1628 const std::string& init_data) { |
1628 if (!LoadContentDecryptorInterface()) | 1629 if (!LoadContentDecryptorInterface()) |
1629 return false; | 1630 return false; |
1630 if (key_system.empty()) | 1631 if (key_system.empty()) |
1631 return false; | 1632 return false; |
1632 | 1633 |
1633 PP_Var init_data_array = | 1634 PP_Var init_data_array = |
1634 PpapiGlobals::Get()->GetVarTracker()->MakeArrayBufferPPVar( | 1635 PpapiGlobals::Get()->GetVarTracker()->MakeArrayBufferPPVar( |
1635 init_data.size(), init_data.data()); | 1636 init_data.size(), init_data.data()); |
1636 | 1637 |
| 1638 // TODO(tomfinegan): Pass "type" once PPP_ContentDecryptor_Private is updated. |
1637 plugin_decryption_interface_->GenerateKeyRequest( | 1639 plugin_decryption_interface_->GenerateKeyRequest( |
1638 pp_instance(), | 1640 pp_instance(), |
1639 StringVar::StringToPPVar(key_system), | 1641 StringVar::StringToPPVar(key_system), |
1640 init_data_array); | 1642 init_data_array); |
1641 return true; | 1643 return true; |
1642 } | 1644 } |
1643 | 1645 |
1644 bool PluginInstance::AddKey(const std::string& session_id, | 1646 bool PluginInstance::AddKey(const std::string& session_id, |
1645 const std::string& key, | 1647 const std::string& key, |
1646 const std::string& init_data) { | 1648 const std::string& init_data) { |
(...skipping 1579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3226 screen_size_for_fullscreen_ = gfx::Size(); | 3228 screen_size_for_fullscreen_ = gfx::Size(); |
3227 WebElement element = container_->element(); | 3229 WebElement element = container_->element(); |
3228 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); | 3230 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); |
3229 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); | 3231 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); |
3230 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); | 3232 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); |
3231 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); | 3233 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); |
3232 } | 3234 } |
3233 | 3235 |
3234 } // namespace ppapi | 3236 } // namespace ppapi |
3235 } // namespace webkit | 3237 } // namespace webkit |
OLD | NEW |