OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "webkit/plugins/ppapi/var_object_class.h" | 5 #include "webkit/plugins/ppapi/var_object_class.h" |
6 | 6 |
7 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" | 7 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" |
8 #include "webkit/plugins/ppapi/npapi_glue.h" | 8 #include "webkit/plugins/ppapi/npapi_glue.h" |
9 #include "webkit/plugins/ppapi/resource_tracker.h" | 9 #include "webkit/plugins/ppapi/resource_tracker.h" |
10 #include "webkit/plugins/ppapi/var.h" | 10 #include "webkit/plugins/ppapi/var.h" |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 : method(prop.method), | 245 : method(prop.method), |
246 getter(prop.getter), | 246 getter(prop.getter), |
247 setter(prop.setter), | 247 setter(prop.setter), |
248 writable(!(prop.modifiers & PP_OBJECTPROPERTY_MODIFIER_READONLY)), | 248 writable(!(prop.modifiers & PP_OBJECTPROPERTY_MODIFIER_READONLY)), |
249 enumerable(!(prop.modifiers & PP_OBJECTPROPERTY_MODIFIER_DONTENUM)) { | 249 enumerable(!(prop.modifiers & PP_OBJECTPROPERTY_MODIFIER_DONTENUM)) { |
250 } | 250 } |
251 | 251 |
252 VarObjectClass::InstanceData::InstanceData() : native_data(NULL) { | 252 VarObjectClass::InstanceData::InstanceData() : native_data(NULL) { |
253 } | 253 } |
254 | 254 |
| 255 VarObjectClass::InstanceData::~InstanceData() {} |
| 256 |
255 VarObjectClass::VarObjectClass(PluginInstance* instance, | 257 VarObjectClass::VarObjectClass(PluginInstance* instance, |
256 PP_ClassDestructor destruct, | 258 PP_ClassDestructor destruct, |
257 PP_ClassFunction invoke, | 259 PP_ClassFunction invoke, |
258 PP_ClassProperty* properties) | 260 PP_ClassProperty* properties) |
259 : Resource(instance), | 261 : Resource(instance), |
260 instance_native_destructor_(destruct), | 262 instance_native_destructor_(destruct), |
261 instance_invoke_(invoke) { | 263 instance_invoke_(invoke) { |
262 PP_ClassProperty* prop = properties; | 264 PP_ClassProperty* prop = properties; |
263 while (prop->name) { | 265 while (prop->name) { |
264 properties_.insert(std::make_pair(std::string(prop->name), | 266 properties_.insert(std::make_pair(std::string(prop->name), |
(...skipping 14 matching lines...) Expand all Loading... |
279 const PPB_Class* VarObjectClass::GetInterface() { | 281 const PPB_Class* VarObjectClass::GetInterface() { |
280 static PPB_Class interface = { | 282 static PPB_Class interface = { |
281 &Create, | 283 &Create, |
282 &Instantiate | 284 &Instantiate |
283 }; | 285 }; |
284 return &interface; | 286 return &interface; |
285 } | 287 } |
286 | 288 |
287 } // namespace ppapi | 289 } // namespace ppapi |
288 } // namespace webkit | 290 } // namespace webkit |
OLD | NEW |