OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/plugin/npobject_util.h" | 5 #include "chrome/plugin/npobject_util.h" |
6 | 6 |
7 #include "chrome/common/plugin_messages.h" | 7 #include "chrome/common/plugin_messages.h" |
8 #include "chrome/common/win_util.h" | 8 #include "chrome/common/win_util.h" |
9 #include "chrome/plugin/npobject_proxy.h" | 9 #include "chrome/plugin/npobject_proxy.h" |
10 #include "chrome/plugin/plugin_channel_base.h" | 10 #include "chrome/plugin/plugin_channel_base.h" |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 NOTREACHED(); | 193 NOTREACHED(); |
194 } | 194 } |
195 | 195 |
196 if (release) | 196 if (release) |
197 NPN_ReleaseVariantValue(const_cast<NPVariant*>(&variant)); | 197 NPN_ReleaseVariantValue(const_cast<NPVariant*>(&variant)); |
198 } | 198 } |
199 | 199 |
200 void CreateNPVariant(const NPVariant_Param& param, | 200 void CreateNPVariant(const NPVariant_Param& param, |
201 PluginChannelBase* channel, | 201 PluginChannelBase* channel, |
202 NPVariant* result, | 202 NPVariant* result, |
203 HANDLE modal_dialog_event) { | 203 base::WaitableEvent* modal_dialog_event) { |
204 switch (param.type) { | 204 switch (param.type) { |
205 case NPVARIANT_PARAM_VOID: | 205 case NPVARIANT_PARAM_VOID: |
206 result->type = NPVariantType_Void; | 206 result->type = NPVariantType_Void; |
207 break; | 207 break; |
208 case NPVARIANT_PARAM_NULL: | 208 case NPVARIANT_PARAM_NULL: |
209 result->type = NPVariantType_Null; | 209 result->type = NPVariantType_Null; |
210 break; | 210 break; |
211 case NPVARIANT_PARAM_BOOL: | 211 case NPVARIANT_PARAM_BOOL: |
212 result->type = NPVariantType_Bool; | 212 result->type = NPVariantType_Bool; |
213 result->value.boolValue = param.bool_value; | 213 result->value.boolValue = param.bool_value; |
(...skipping 23 matching lines...) Expand all Loading... |
237 case NPVARIANT_PARAM_OBJECT_POINTER: | 237 case NPVARIANT_PARAM_OBJECT_POINTER: |
238 result->type = NPVariantType_Object; | 238 result->type = NPVariantType_Object; |
239 result->value.objectValue = static_cast<NPObject*>(param.npobject_pointer)
; | 239 result->value.objectValue = static_cast<NPObject*>(param.npobject_pointer)
; |
240 NPN_RetainObject(result->value.objectValue); | 240 NPN_RetainObject(result->value.objectValue); |
241 break; | 241 break; |
242 default: | 242 default: |
243 NOTREACHED(); | 243 NOTREACHED(); |
244 } | 244 } |
245 } | 245 } |
246 | 246 |
OLD | NEW |