| 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/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/linked_ptr.h" | 10 #include "base/memory/linked_ptr.h" |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 | 352 |
| 353 // TODO(xhwang): Fix initialization of PP_EncryptedBlockInfo here and | 353 // TODO(xhwang): Fix initialization of PP_EncryptedBlockInfo here and |
| 354 // anywhere else. | 354 // anywhere else. |
| 355 memset(block_info, 0, sizeof(*block_info)); | 355 memset(block_info, 0, sizeof(*block_info)); |
| 356 | 356 |
| 357 block_info->tracking_info.request_id = request_id; | 357 block_info->tracking_info.request_id = request_id; |
| 358 block_info->tracking_info.timestamp = timestamp; | 358 block_info->tracking_info.timestamp = timestamp; |
| 359 block_info->data_offset = decrypt_config.data_offset(); | 359 block_info->data_offset = decrypt_config.data_offset(); |
| 360 | 360 |
| 361 if (!CopyStringToArray(decrypt_config.key_id(), block_info->key_id) || | 361 if (!CopyStringToArray(decrypt_config.key_id(), block_info->key_id) || |
| 362 !CopyStringToArray(decrypt_config.iv(), block_info->iv) || | 362 !CopyStringToArray(decrypt_config.iv(), block_info->iv)) |
| 363 !CopyStringToArray(decrypt_config.checksum(), block_info->checksum)) | |
| 364 return false; | 363 return false; |
| 365 | 364 |
| 366 block_info->key_id_size = decrypt_config.key_id().size(); | 365 block_info->key_id_size = decrypt_config.key_id().size(); |
| 367 block_info->iv_size = decrypt_config.iv().size(); | 366 block_info->iv_size = decrypt_config.iv().size(); |
| 368 block_info->checksum_size = decrypt_config.checksum().size(); | |
| 369 | 367 |
| 370 if (decrypt_config.subsamples().size() > arraysize(block_info->subsamples)) | 368 if (decrypt_config.subsamples().size() > arraysize(block_info->subsamples)) |
| 371 return false; | 369 return false; |
| 372 | 370 |
| 373 block_info->num_subsamples = decrypt_config.subsamples().size(); | 371 block_info->num_subsamples = decrypt_config.subsamples().size(); |
| 374 for (uint32_t i = 0; i < block_info->num_subsamples; ++i) { | 372 for (uint32_t i = 0; i < block_info->num_subsamples; ++i) { |
| 375 block_info->subsamples[i].clear_bytes = | 373 block_info->subsamples[i].clear_bytes = |
| 376 decrypt_config.subsamples()[i].clear_bytes; | 374 decrypt_config.subsamples()[i].clear_bytes; |
| 377 block_info->subsamples[i].cipher_bytes = | 375 block_info->subsamples[i].cipher_bytes = |
| 378 decrypt_config.subsamples()[i].cypher_bytes; | 376 decrypt_config.subsamples()[i].cypher_bytes; |
| (...skipping 2284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2663 screen_size_for_fullscreen_ = gfx::Size(); | 2661 screen_size_for_fullscreen_ = gfx::Size(); |
| 2664 WebElement element = container_->element(); | 2662 WebElement element = container_->element(); |
| 2665 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); | 2663 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); |
| 2666 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); | 2664 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); |
| 2667 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); | 2665 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); |
| 2668 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); | 2666 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); |
| 2669 } | 2667 } |
| 2670 | 2668 |
| 2671 } // namespace ppapi | 2669 } // namespace ppapi |
| 2672 } // namespace webkit | 2670 } // namespace webkit |
| OLD | NEW |