| 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 <cstring> | 5 #include <cstring> |
| 6 #include <map> | 6 #include <map> |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 #if defined(CHECK_ORIGIN_URL) | 645 #if defined(CHECK_ORIGIN_URL) |
| 646 pp::InstancePrivate instance_private(pp_instance()); | 646 pp::InstancePrivate instance_private(pp_instance()); |
| 647 pp::VarPrivate window = instance_private.GetWindowObject(); | 647 pp::VarPrivate window = instance_private.GetWindowObject(); |
| 648 std::string origin = window.GetProperty("top").GetProperty("location") | 648 std::string origin = window.GetProperty("top").GetProperty("location") |
| 649 .GetProperty("origin").AsString(); | 649 .GetProperty("origin").AsString(); |
| 650 PP_DCHECK(origin != "null"); | 650 PP_DCHECK(origin != "null"); |
| 651 #endif // defined(CHECK_ORIGIN_URL) | 651 #endif // defined(CHECK_ORIGIN_URL) |
| 652 | 652 |
| 653 if (!cdm_) { | 653 if (!cdm_) { |
| 654 if (!CreateCdmInstance(key_system)) { | 654 if (!CreateCdmInstance(key_system)) { |
| 655 SendUnknownKeyError(key_system, ""); | 655 SendUnknownKeyError(key_system, std::string()); |
| 656 return; | 656 return; |
| 657 } | 657 } |
| 658 } | 658 } |
| 659 PP_DCHECK(cdm_); | 659 PP_DCHECK(cdm_); |
| 660 | 660 |
| 661 // Must be set here in case the CDM synchronously calls a cdm::Host method. | 661 // Must be set here in case the CDM synchronously calls a cdm::Host method. |
| 662 // Clear below on error. | 662 // Clear below on error. |
| 663 // TODO(ddorwin): Set/clear key_system_ & cdm_ at same time; clear both on | 663 // TODO(ddorwin): Set/clear key_system_ & cdm_ at same time; clear both on |
| 664 // error below. | 664 // error below. |
| 665 key_system_ = key_system; | 665 key_system_ = key_system; |
| (...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1187 } // namespace webkit_media | 1187 } // namespace webkit_media |
| 1188 | 1188 |
| 1189 namespace pp { | 1189 namespace pp { |
| 1190 | 1190 |
| 1191 // Factory function for your specialization of the Module object. | 1191 // Factory function for your specialization of the Module object. |
| 1192 Module* CreateModule() { | 1192 Module* CreateModule() { |
| 1193 return new webkit_media::CdmWrapperModule(); | 1193 return new webkit_media::CdmWrapperModule(); |
| 1194 } | 1194 } |
| 1195 | 1195 |
| 1196 } // namespace pp | 1196 } // namespace pp |
| OLD | NEW |