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

Side by Side Diff: ppapi/shared_impl/var.h

Issue 7706021: Convert FileRefImpl and URLRequestInfo to shared_impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tests fixed Created 9 years, 3 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
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 #ifndef PPAPI_SHARED_IMPL_VAR_H_ 5 #ifndef PPAPI_SHARED_IMPL_VAR_H_
6 #define PPAPI_SHARED_IMPL_VAR_H_ 6 #define PPAPI_SHARED_IMPL_VAR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // Returning a given string as a PP_Var: 83 // Returning a given string as a PP_Var:
84 // return StringVar::StringToPPVar(module, my_string); 84 // return StringVar::StringToPPVar(module, my_string);
85 // 85 //
86 // Converting a PP_Var to a string: 86 // Converting a PP_Var to a string:
87 // StringVar* string = StringVar::FromPPVar(var); 87 // StringVar* string = StringVar::FromPPVar(var);
88 // if (!string) 88 // if (!string)
89 // return false; // Not a string or an invalid var. 89 // return false; // Not a string or an invalid var.
90 // DoSomethingWithTheString(string->value()); 90 // DoSomethingWithTheString(string->value());
91 class StringVar : public Var { 91 class StringVar : public Var {
92 public: 92 public:
93 StringVar(PP_Module module, const std::string& str);
93 StringVar(PP_Module module, const char* str, uint32 len); 94 StringVar(PP_Module module, const char* str, uint32 len);
94 virtual ~StringVar(); 95 virtual ~StringVar();
95 96
96 const std::string& value() const { return value_; } 97 const std::string& value() const { return value_; }
97 98
98 // Var override. 99 // Var override.
99 virtual StringVar* AsStringVar() OVERRIDE; 100 virtual StringVar* AsStringVar() OVERRIDE;
100 virtual PP_Var GetPPVar() OVERRIDE; 101 virtual PP_Var GetPPVar() OVERRIDE;
101 virtual PP_VarType GetType() const OVERRIDE; 102 virtual PP_VarType GetType() const OVERRIDE;
102 103
(...skipping 13 matching lines...) Expand all
116 117
117 private: 118 private:
118 std::string value_; 119 std::string value_;
119 120
120 DISALLOW_COPY_AND_ASSIGN(StringVar); 121 DISALLOW_COPY_AND_ASSIGN(StringVar);
121 }; 122 };
122 123
123 } // namespace ppapi 124 } // namespace ppapi
124 125
125 #endif // PPAPI_SHARED_IMPL_VAR_H_ 126 #endif // PPAPI_SHARED_IMPL_VAR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698