| OLD | NEW |
| 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 #ifndef PPAPI_CPP_SCRIPTABLE_OBJECT_DEPRECATED_H_ | 5 #ifndef PPAPI_CPP_SCRIPTABLE_OBJECT_DEPRECATED_H_ |
| 6 #define PPAPI_CPP_SCRIPTABLE_OBJECT_DEPRECATED_H_ | 6 #define PPAPI_CPP_SCRIPTABLE_OBJECT_DEPRECATED_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 struct PPP_Class_Deprecated; | 10 struct PPP_Class_Deprecated; |
| 11 | 11 |
| 12 namespace pp { | 12 namespace pp { |
| 13 class Var; | 13 class Var; |
| 14 class VarPrivate; |
| 14 } | 15 } |
| 15 using pp::Var; | |
| 16 | 16 |
| 17 namespace pp { | 17 namespace pp { |
| 18 | 18 |
| 19 namespace deprecated { | 19 namespace deprecated { |
| 20 | 20 |
| 21 // This class allows you to implement objects accessible by JavaScript. Derive | 21 // This class allows you to implement objects accessible by JavaScript. Derive |
| 22 // from this class and override the virtual functions you support. pp::Var has | 22 // from this class and override the virtual functions you support. pp::Var has |
| 23 // a constructor that takes a pointer to a ScriptableObject for when you want | 23 // a constructor that takes a pointer to a ScriptableObject for when you want |
| 24 // to convert your custom object to a var. | 24 // to convert your custom object to a var. |
| 25 // | 25 // |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 const std::vector<Var>& args, | 70 const std::vector<Var>& args, |
| 71 Var* exception); | 71 Var* exception); |
| 72 | 72 |
| 73 // The default implementation sets an exception that the method does not | 73 // The default implementation sets an exception that the method does not |
| 74 // exist. | 74 // exist. |
| 75 virtual Var Construct(const std::vector<Var>& args, | 75 virtual Var Construct(const std::vector<Var>& args, |
| 76 Var* exception); | 76 Var* exception); |
| 77 | 77 |
| 78 private: | 78 private: |
| 79 friend class ::pp::Var; | 79 friend class ::pp::Var; |
| 80 friend class ::pp::VarPrivate; |
| 80 static const PPP_Class_Deprecated* GetClass(); | 81 static const PPP_Class_Deprecated* GetClass(); |
| 81 | 82 |
| 82 // Unimplemented, copy and assigmnent is not allowed. | 83 // Unimplemented, copy and assigmnent is not allowed. |
| 83 ScriptableObject(const ScriptableObject& other); | 84 ScriptableObject(const ScriptableObject& other); |
| 84 ScriptableObject& operator=(const ScriptableObject& other); | 85 ScriptableObject& operator=(const ScriptableObject& other); |
| 85 }; | 86 }; |
| 86 | 87 |
| 87 } // namespace deprecated | 88 } // namespace deprecated |
| 88 | 89 |
| 89 } // namespace pp | 90 } // namespace pp |
| 90 | 91 |
| 91 #endif // PPAPI_CPP_SCRIPTABLE_OBJECT_DEPRECATED_H_ | 92 #endif // PPAPI_CPP_SCRIPTABLE_OBJECT_DEPRECATED_H_ |
| 92 | 93 |
| OLD | NEW |