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

Side by Side Diff: ppapi/shared_impl/var_value_conversions.cc

Issue 18599005: [PPAPI] Added PP_VARTYPE_RESOURCE as a PP_VarType enum value. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix unittest_utils comparison of resource vars. Created 7 years, 3 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
« ppapi/shared_impl/var.cc ('K') | « ppapi/shared_impl/var.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ppapi/shared_impl/var_value_conversions.h" 5 #include "ppapi/shared_impl/var_value_conversions.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <set> 8 #include <set>
9 #include <stack> 9 #include <stack>
10 10
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 return false; 124 return false;
125 125
126 base::BinaryValue* binary_value = 126 base::BinaryValue* binary_value =
127 base::BinaryValue::CreateWithCopiedBuffer( 127 base::BinaryValue::CreateWithCopiedBuffer(
128 static_cast<const char*>(array_buffer->Map()), 128 static_cast<const char*>(array_buffer->Map()),
129 array_buffer->ByteLength()); 129 array_buffer->ByteLength());
130 array_buffer->Unmap(); 130 array_buffer->Unmap();
131 value->reset(binary_value); 131 value->reset(binary_value);
132 return true; 132 return true;
133 } 133 }
134 case PP_VARTYPE_RESOURCE: {
135 return false;
136 }
134 } 137 }
135 NOTREACHED(); 138 NOTREACHED();
136 return false; 139 return false;
137 } 140 }
138 141
139 // Helper function for CreateVarFromValue(). It only looks at |value| but not 142 // Helper function for CreateVarFromValue(). It only looks at |value| but not
140 // its descendants. The conversion result is stored in |var|. If |value| is list 143 // its descendants. The conversion result is stored in |var|. If |value| is list
141 // or dictionary, a new node is pushed onto |state|. 144 // or dictionary, a new node is pushed onto |state|.
142 // 145 //
143 // Returns false on failure. 146 // Returns false on failure.
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 iter != result.end(); 385 iter != result.end();
383 ++iter) { 386 ++iter) {
384 vars->push_back(iter->Release()); 387 vars->push_back(iter->Release());
385 } 388 }
386 389
387 return true; 390 return true;
388 } 391 }
389 392
390 } // namespace ppapi 393 } // namespace ppapi
391 394
OLDNEW
« ppapi/shared_impl/var.cc ('K') | « ppapi/shared_impl/var.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698