Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Side by Side Diff: Source/modules/encryptedmedia/MediaKeySystemAccess.cpp

Issue 1112363003: Oilpan: Remove OffHeapCollectionTrait (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "config.h" 5 #include "config.h"
6 #include "modules/encryptedmedia/MediaKeySystemAccess.h" 6 #include "modules/encryptedmedia/MediaKeySystemAccess.h"
7 7
8 #include "bindings/core/v8/ScriptPromiseResolver.h" 8 #include "bindings/core/v8/ScriptPromiseResolver.h"
9 #include "bindings/core/v8/ScriptState.h" 9 #include "bindings/core/v8/ScriptState.h"
10 #include "core/dom/DOMException.h" 10 #include "core/dom/DOMException.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // NavigatorRequestMediaKeySystemAccess. 66 // NavigatorRequestMediaKeySystemAccess.
67 static Vector<String> convertInitDataTypes(const WebVector<WebEncryptedMediaInit DataType>& initDataTypes) 67 static Vector<String> convertInitDataTypes(const WebVector<WebEncryptedMediaInit DataType>& initDataTypes)
68 { 68 {
69 Vector<String> result; 69 Vector<String> result;
70 result.reserveCapacity(initDataTypes.size()); 70 result.reserveCapacity(initDataTypes.size());
71 for (size_t i = 0; i < initDataTypes.size(); i++) 71 for (size_t i = 0; i < initDataTypes.size(); i++)
72 result.append(EncryptedMediaUtils::convertFromInitDataType(initDataTypes [i])); 72 result.append(EncryptedMediaUtils::convertFromInitDataType(initDataTypes [i]));
73 return result; 73 return result;
74 } 74 }
75 75
76 static Vector<MediaKeySystemMediaCapability> convertCapabilities(const WebVector <WebMediaKeySystemMediaCapability>& capabilities) 76 static HeapVector<MediaKeySystemMediaCapability> convertCapabilities(const WebVe ctor<WebMediaKeySystemMediaCapability>& capabilities)
77 { 77 {
78 Vector<MediaKeySystemMediaCapability> result; 78 HeapVector<MediaKeySystemMediaCapability> result;
79 result.reserveCapacity(capabilities.size()); 79 result.reserveCapacity(capabilities.size());
80 for (size_t i = 0; i < capabilities.size(); i++) { 80 for (size_t i = 0; i < capabilities.size(); i++) {
81 MediaKeySystemMediaCapability capability; 81 MediaKeySystemMediaCapability capability;
82 capability.setContentType(capabilities[i].contentType); 82 capability.setContentType(capabilities[i].contentType);
83 capability.setRobustness(capabilities[i].robustness); 83 capability.setRobustness(capabilities[i].robustness);
84 result.append(capability); 84 result.append(capability);
85 } 85 }
86 return result; 86 return result;
87 } 87 }
88 88
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 168
169 // 3. Return promise. 169 // 3. Return promise.
170 return promise; 170 return promise;
171 } 171 }
172 172
173 DEFINE_TRACE(MediaKeySystemAccess) 173 DEFINE_TRACE(MediaKeySystemAccess)
174 { 174 {
175 } 175 }
176 176
177 } // namespace blink 177 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/parser/HTMLScriptRunner.h ('k') | Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698