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

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

Issue 23346009: [PPAPI] Added a new Var subclass, ResourceVar. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: gyp: Fix linker errors by linking against ipc.dll. 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
« no previous file with comments | « ppapi/shared_impl/var.h ('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/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 } 84 }
85 85
86 ArrayVar* Var::AsArrayVar() { 86 ArrayVar* Var::AsArrayVar() {
87 return NULL; 87 return NULL;
88 } 88 }
89 89
90 DictionaryVar* Var::AsDictionaryVar() { 90 DictionaryVar* Var::AsDictionaryVar() {
91 return NULL; 91 return NULL;
92 } 92 }
93 93
94 ResourceVar* Var::AsResourceVar() {
95 return NULL;
96 }
97
94 PP_Var Var::GetPPVar() { 98 PP_Var Var::GetPPVar() {
95 int32 id = GetOrCreateVarID(); 99 int32 id = GetOrCreateVarID();
96 if (!id) 100 if (!id)
97 return PP_MakeNull(); 101 return PP_MakeNull();
98 102
99 PP_Var result; 103 PP_Var result;
100 result.type = GetType(); 104 result.type = GetType();
101 result.padding = 0; 105 result.padding = 0;
102 result.value.as_id = id; 106 result.value.as_id = id;
103 return result; 107 return result;
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 return NULL; 206 return NULL;
203 scoped_refptr<Var> var_object( 207 scoped_refptr<Var> var_object(
204 PpapiGlobals::Get()->GetVarTracker()->GetVar(var)); 208 PpapiGlobals::Get()->GetVarTracker()->GetVar(var));
205 if (!var_object.get()) 209 if (!var_object.get())
206 return NULL; 210 return NULL;
207 return var_object->AsArrayBufferVar(); 211 return var_object->AsArrayBufferVar();
208 } 212 }
209 213
210 } // namespace ppapi 214 } // namespace ppapi
211 215
OLDNEW
« no previous file with comments | « ppapi/shared_impl/var.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698