| 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 1616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1627 const std::string& init_data) { | 1627 const std::string& init_data) { |
| 1628 if (!LoadContentDecryptorInterface()) | 1628 if (!LoadContentDecryptorInterface()) |
| 1629 return false; | 1629 return false; |
| 1630 if (key_system.empty()) | 1630 if (key_system.empty()) |
| 1631 return false; | 1631 return false; |
| 1632 | 1632 |
| 1633 PP_Var init_data_array = | 1633 PP_Var init_data_array = |
| 1634 PpapiGlobals::Get()->GetVarTracker()->MakeArrayBufferPPVar( | 1634 PpapiGlobals::Get()->GetVarTracker()->MakeArrayBufferPPVar( |
| 1635 init_data.size(), init_data.data()); | 1635 init_data.size(), init_data.data()); |
| 1636 | 1636 |
| 1637 // TODO(tomfinegan): Add type argument to this method, and stop passing an |
| 1638 // empty string. |
| 1639 const std::string type = ""; |
| 1637 plugin_decryption_interface_->GenerateKeyRequest( | 1640 plugin_decryption_interface_->GenerateKeyRequest( |
| 1638 pp_instance(), | 1641 pp_instance(), |
| 1639 StringVar::StringToPPVar(key_system), | 1642 StringVar::StringToPPVar(key_system), |
| 1643 StringVar::StringToPPVar(type), |
| 1640 init_data_array); | 1644 init_data_array); |
| 1641 return true; | 1645 return true; |
| 1642 } | 1646 } |
| 1643 | 1647 |
| 1644 bool PluginInstance::AddKey(const std::string& session_id, | 1648 bool PluginInstance::AddKey(const std::string& session_id, |
| 1645 const std::string& key, | 1649 const std::string& key, |
| 1646 const std::string& init_data) { | 1650 const std::string& init_data) { |
| 1647 if (!LoadContentDecryptorInterface()) | 1651 if (!LoadContentDecryptorInterface()) |
| 1648 return false; | 1652 return false; |
| 1649 PP_Var key_array = | 1653 PP_Var key_array = |
| (...skipping 1576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3226 screen_size_for_fullscreen_ = gfx::Size(); | 3230 screen_size_for_fullscreen_ = gfx::Size(); |
| 3227 WebElement element = container_->element(); | 3231 WebElement element = container_->element(); |
| 3228 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); | 3232 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); |
| 3229 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); | 3233 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); |
| 3230 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); | 3234 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); |
| 3231 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); | 3235 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); |
| 3232 } | 3236 } |
| 3233 | 3237 |
| 3234 } // namespace ppapi | 3238 } // namespace ppapi |
| 3235 } // namespace webkit | 3239 } // namespace webkit |
| OLD | NEW |