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 "content/renderer/renderer_webkitplatformsupport_impl.h" | 5 #include "content/renderer/renderer_webkitplatformsupport_impl.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 mime_type_ascii, strict_codecs, key_system_ascii)) { | 426 mime_type_ascii, strict_codecs, key_system_ascii)) { |
427 return IsNotSupported; | 427 return IsNotSupported; |
428 } | 428 } |
429 | 429 |
430 // Continue processing the mime_type and codecs. | 430 // Continue processing the mime_type and codecs. |
431 } | 431 } |
432 | 432 |
433 // Check list of strict codecs to see if it is supported. | 433 // Check list of strict codecs to see if it is supported. |
434 if (net::IsStrictMediaMimeType(mime_type_ascii)) { | 434 if (net::IsStrictMediaMimeType(mime_type_ascii)) { |
435 // We support the container, but no codecs were specified. | 435 // We support the container, but no codecs were specified. |
436 if (codecs.isNull()) | 436 if (codecs.isNull()) { |
| 437 // Some containers specifically do not want any codecs. |
| 438 if (net::MimeTypeDoesNotNeedCodecs(mime_type_ascii)) |
| 439 return IsSupported; |
437 return MayBeSupported; | 440 return MayBeSupported; |
| 441 } |
438 | 442 |
439 // Check if the codecs are a perfect match. | 443 // Check if the codecs are a perfect match. |
440 std::vector<std::string> strict_codecs; | 444 std::vector<std::string> strict_codecs; |
441 net::ParseCodecString(ToASCIIOrEmpty(codecs), &strict_codecs, false); | 445 net::ParseCodecString(ToASCIIOrEmpty(codecs), &strict_codecs, false); |
442 if (!net::IsSupportedStrictMediaMimeType(mime_type_ascii, strict_codecs)) | 446 if (!net::IsSupportedStrictMediaMimeType(mime_type_ascii, strict_codecs)) |
443 return IsNotSupported; | 447 return IsNotSupported; |
444 | 448 |
445 // Good to go! | 449 // Good to go! |
446 return IsSupported; | 450 return IsSupported; |
447 } | 451 } |
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1173 return; | 1177 return; |
1174 QuotaDispatcher::ThreadSpecificInstance( | 1178 QuotaDispatcher::ThreadSpecificInstance( |
1175 thread_safe_sender_.get(), | 1179 thread_safe_sender_.get(), |
1176 quota_message_filter_.get())->QueryStorageUsageAndQuota( | 1180 quota_message_filter_.get())->QueryStorageUsageAndQuota( |
1177 storage_partition, | 1181 storage_partition, |
1178 static_cast<quota::StorageType>(type), | 1182 static_cast<quota::StorageType>(type), |
1179 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); | 1183 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); |
1180 } | 1184 } |
1181 | 1185 |
1182 } // namespace content | 1186 } // namespace content |
OLD | NEW |