| 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 "content/renderer/pepper/npapi_glue.h" | 5 #include "content/renderer/pepper/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/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "content/renderer/pepper/host_array_buffer_var.h" | 10 #include "content/renderer/pepper/host_array_buffer_var.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 *result); | 108 *result); |
| 109 break; | 109 break; |
| 110 } | 110 } |
| 111 // The following types are not supported for use with PPB_Var_Deprecated, | 111 // The following types are not supported for use with PPB_Var_Deprecated, |
| 112 // because PPB_Var_Deprecated is only for trusted plugins, and the trusted | 112 // because PPB_Var_Deprecated is only for trusted plugins, and the trusted |
| 113 // plugins we have don't need these types. We can add support in the future | 113 // plugins we have don't need these types. We can add support in the future |
| 114 // if it becomes necessary. | 114 // if it becomes necessary. |
| 115 case PP_VARTYPE_ARRAY: | 115 case PP_VARTYPE_ARRAY: |
| 116 case PP_VARTYPE_DICTIONARY: | 116 case PP_VARTYPE_DICTIONARY: |
| 117 case PP_VARTYPE_ARRAY_BUFFER: | 117 case PP_VARTYPE_ARRAY_BUFFER: |
| 118 case PP_VARTYPE_RESOURCE: |
| 118 VOID_TO_NPVARIANT(*result); | 119 VOID_TO_NPVARIANT(*result); |
| 119 break; | 120 break; |
| 120 } | 121 } |
| 121 return true; | 122 return true; |
| 122 } | 123 } |
| 123 | 124 |
| 124 PP_Var NPVariantToPPVar(PepperPluginInstanceImpl* instance, | 125 PP_Var NPVariantToPPVar(PepperPluginInstanceImpl* instance, |
| 125 const NPVariant* variant) { | 126 const NPVariant* variant) { |
| 126 switch (variant->type) { | 127 switch (variant->type) { |
| 127 case NPVariantType_Void: | 128 case NPVariantType_Void: |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 } | 348 } |
| 348 } | 349 } |
| 349 } | 350 } |
| 350 | 351 |
| 351 // static | 352 // static |
| 352 void TryCatch::Catch(void* self, const char* message) { | 353 void TryCatch::Catch(void* self, const char* message) { |
| 353 static_cast<TryCatch*>(self)->SetException(message); | 354 static_cast<TryCatch*>(self)->SetException(message); |
| 354 } | 355 } |
| 355 | 356 |
| 356 } // namespace content | 357 } // namespace content |
| OLD | NEW |