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

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

Issue 10828023: PPAPI/NaCl: Make NaClIPCAdapter transfer handles more generally (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: re-add gyp files Created 8 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/shared_impl/ppb_network_list_private_shared.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) 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 "ppapi/shared_impl/var.h" 5 #include "ppapi/shared_impl/var.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 StringVar* StringVar::AsStringVar() { 130 StringVar* StringVar::AsStringVar() {
131 return this; 131 return this;
132 } 132 }
133 133
134 PP_VarType StringVar::GetType() const { 134 PP_VarType StringVar::GetType() const {
135 return PP_VARTYPE_STRING; 135 return PP_VARTYPE_STRING;
136 } 136 }
137 137
138 // static 138 // static
139 PP_Var StringVar::StringToPPVar(const std::string& var) { 139 PP_Var StringVar::StringToPPVar(const std::string& var) {
140 return StringToPPVar(var.c_str(), var.size()); 140 return StringToPPVar(var.c_str(), static_cast<uint32>(var.size()));
141 } 141 }
142 142
143 // static 143 // static
144 PP_Var StringVar::StringToPPVar(const char* data, uint32 len) { 144 PP_Var StringVar::StringToPPVar(const char* data, uint32 len) {
145 scoped_refptr<StringVar> str(new StringVar(data, len)); 145 scoped_refptr<StringVar> str(new StringVar(data, len));
146 if (!str || !IsStringUTF8(str->value())) 146 if (!str || !IsStringUTF8(str->value()))
147 return PP_MakeNull(); 147 return PP_MakeNull();
148 return str->GetPPVar(); 148 return str->GetPPVar();
149 } 149 }
150 150
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 return NULL; 188 return NULL;
189 scoped_refptr<Var> var_object( 189 scoped_refptr<Var> var_object(
190 PpapiGlobals::Get()->GetVarTracker()->GetVar(var)); 190 PpapiGlobals::Get()->GetVarTracker()->GetVar(var));
191 if (!var_object) 191 if (!var_object)
192 return NULL; 192 return NULL;
193 return var_object->AsArrayBufferVar(); 193 return var_object->AsArrayBufferVar();
194 } 194 }
195 195
196 } // namespace ppapi 196 } // namespace ppapi
197 197
OLDNEW
« no previous file with comments | « ppapi/shared_impl/ppb_network_list_private_shared.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698