| OLD | NEW | 
|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/npapi_glue.h" | 5 #include "webkit/plugins/ppapi/npapi_glue.h" | 
| 6 | 6 | 
| 7 #include "base/logging.h" | 7 #include "base/logging.h" | 
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" | 
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" | 
| 10 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 10 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 57     case PP_VARTYPE_OBJECT: { | 57     case PP_VARTYPE_OBJECT: { | 
| 58       scoped_refptr<ObjectVar> object(ObjectVar::FromPPVar(var)); | 58       scoped_refptr<ObjectVar> object(ObjectVar::FromPPVar(var)); | 
| 59       if (!object) { | 59       if (!object) { | 
| 60         VOID_TO_NPVARIANT(*result); | 60         VOID_TO_NPVARIANT(*result); | 
| 61         return false; | 61         return false; | 
| 62       } | 62       } | 
| 63       OBJECT_TO_NPVARIANT(WebBindings::retainObject(object->np_object()), | 63       OBJECT_TO_NPVARIANT(WebBindings::retainObject(object->np_object()), | 
| 64                           *result); | 64                           *result); | 
| 65       break; | 65       break; | 
| 66     } | 66     } | 
|  | 67     case PP_VARTYPE_ARRAY: | 
|  | 68     case PP_VARTYPE_DICTIONARY: | 
|  | 69       VOID_TO_NPVARIANT(*result); | 
|  | 70       break; | 
| 67   } | 71   } | 
| 68   return true; | 72   return true; | 
| 69 } | 73 } | 
| 70 | 74 | 
| 71 // PPResultAndExceptionToNPResult ---------------------------------------------- | 75 // PPResultAndExceptionToNPResult ---------------------------------------------- | 
| 72 | 76 | 
| 73 PPResultAndExceptionToNPResult::PPResultAndExceptionToNPResult( | 77 PPResultAndExceptionToNPResult::PPResultAndExceptionToNPResult( | 
| 74     NPObject* object_var, | 78     NPObject* object_var, | 
| 75     NPVariant* np_result) | 79     NPVariant* np_result) | 
| 76     : object_var_(object_var), | 80     : object_var_(object_var), | 
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 193       identifier_.type = PP_VARTYPE_UNDEFINED;  // Mark it invalid. | 197       identifier_.type = PP_VARTYPE_UNDEFINED;  // Mark it invalid. | 
| 194   } | 198   } | 
| 195 } | 199 } | 
| 196 | 200 | 
| 197 NPObjectAccessorWithIdentifier::~NPObjectAccessorWithIdentifier() { | 201 NPObjectAccessorWithIdentifier::~NPObjectAccessorWithIdentifier() { | 
| 198   Var::PluginReleasePPVar(identifier_); | 202   Var::PluginReleasePPVar(identifier_); | 
| 199 } | 203 } | 
| 200 | 204 | 
| 201 }  // namespace ppapi | 205 }  // namespace ppapi | 
| 202 }  // namespace webkit | 206 }  // namespace webkit | 
| OLD | NEW | 
|---|