| 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/host_globals.h" | 10 #include "webkit/plugins/ppapi/host_globals.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 if (!object) { | 68 if (!object) { |
| 69 VOID_TO_NPVARIANT(*result); | 69 VOID_TO_NPVARIANT(*result); |
| 70 return false; | 70 return false; |
| 71 } | 71 } |
| 72 OBJECT_TO_NPVARIANT(WebBindings::retainObject(object->np_object()), | 72 OBJECT_TO_NPVARIANT(WebBindings::retainObject(object->np_object()), |
| 73 *result); | 73 *result); |
| 74 break; | 74 break; |
| 75 } | 75 } |
| 76 case PP_VARTYPE_ARRAY: | 76 case PP_VARTYPE_ARRAY: |
| 77 case PP_VARTYPE_DICTIONARY: | 77 case PP_VARTYPE_DICTIONARY: |
| 78 case PP_VARTYPE_ARRAY_BUFFER: |
| 78 VOID_TO_NPVARIANT(*result); | 79 VOID_TO_NPVARIANT(*result); |
| 79 break; | 80 break; |
| 80 } | 81 } |
| 81 return true; | 82 return true; |
| 82 } | 83 } |
| 83 | 84 |
| 84 PP_Var NPVariantToPPVar(PluginInstance* instance, const NPVariant* variant) { | 85 PP_Var NPVariantToPPVar(PluginInstance* instance, const NPVariant* variant) { |
| 85 switch (variant->type) { | 86 switch (variant->type) { |
| 86 case NPVariantType_Void: | 87 case NPVariantType_Void: |
| 87 return PP_MakeUndefined(); | 88 return PP_MakeUndefined(); |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 } | 313 } |
| 313 } | 314 } |
| 314 | 315 |
| 315 // static | 316 // static |
| 316 void TryCatch::Catch(void* self, const char* message) { | 317 void TryCatch::Catch(void* self, const char* message) { |
| 317 static_cast<TryCatch*>(self)->SetException(message); | 318 static_cast<TryCatch*>(self)->SetException(message); |
| 318 } | 319 } |
| 319 | 320 |
| 320 } // namespace ppapi | 321 } // namespace ppapi |
| 321 } // namespace webkit | 322 } // namespace webkit |
| OLD | NEW |