Chromium Code Reviews

Side by Side Diff: webkit/glue/plugins/pepper_var.cc

Issue 2822031: File API boilerplate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
« no previous file with comments | « webkit/glue/plugins/pepper_var.h ('k') | webkit/glue/webkit_glue.gypi » ('j') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/glue/plugins/pepper_var.h" 5 #include "webkit/glue/plugins/pepper_var.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/scoped_ptr.h" 8 #include "base/scoped_ptr.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "third_party/ppapi/c/pp_var.h" 10 #include "third_party/ppapi/c/pp_var.h"
(...skipping 821 matching lines...)
832 WebBindings::retainObject(object); 832 WebBindings::retainObject(object);
833 return ret; 833 return ret;
834 } 834 }
835 835
836 NPObject* GetNPObject(PP_Var var) { 836 NPObject* GetNPObject(PP_Var var) {
837 if (var.type != PP_VarType_Object) 837 if (var.type != PP_VarType_Object)
838 return NULL; 838 return NULL;
839 return GetNPObjectUnchecked(var); 839 return GetNPObjectUnchecked(var);
840 } 840 }
841 841
842 PP_Var StringToPPVar(const std::string& str) {
843 DCHECK(IsStringUTF8(str));
844 return VarFromUtf8(str.data(), str.size());
845 }
846
842 String* GetString(PP_Var var) { 847 String* GetString(PP_Var var) {
843 if (var.type != PP_VarType_String) 848 if (var.type != PP_VarType_String)
844 return NULL; 849 return NULL;
845 return GetStringUnchecked(var); 850 return GetStringUnchecked(var);
846 } 851 }
847 852
848 } // namespace pepper 853 } // namespace pepper
OLDNEW
« no previous file with comments | « webkit/glue/plugins/pepper_var.h ('k') | webkit/glue/webkit_glue.gypi » ('j') | no next file with comments »

Powered by Google App Engine