Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Side by Side Diff: webkit/plugins/ppapi/npapi_glue.cc

Issue 6823016: Create a VarPrivate interface to contain the scripting helper functions of Var. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/serialized_var.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ppapi/proxy/serialized_var.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698