| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_RESOURCE_VAR_H_ | 5 #ifndef PPAPI_SHARED_IMPL_RESOURCE_VAR_H_ |
| 6 #define PPAPI_SHARED_IMPL_RESOURCE_VAR_H_ | 6 #define PPAPI_SHARED_IMPL_RESOURCE_VAR_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/pp_resource.h" | 8 #include "ppapi/c/pp_resource.h" |
| 9 #include "ppapi/c/pp_var.h" | 9 #include "ppapi/c/pp_var.h" |
| 10 #include "ppapi/shared_impl/ppapi_shared_export.h" | 10 #include "ppapi/shared_impl/ppapi_shared_export.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // Gets the message for creating a plugin-side resource. Returns NULL if the | 34 // Gets the message for creating a plugin-side resource. Returns NULL if the |
| 35 // message is empty (which is always true on the plugin side). | 35 // message is empty (which is always true on the plugin side). |
| 36 virtual const IPC::Message* GetCreationMessage() const; | 36 virtual const IPC::Message* GetCreationMessage() const; |
| 37 | 37 |
| 38 // Determines whether this is a pending resource. | 38 // Determines whether this is a pending resource. |
| 39 // This is true if, on the host side, the there is a creation_message and no | 39 // This is true if, on the host side, the there is a creation_message and no |
| 40 // PP_Resource. | 40 // PP_Resource. |
| 41 virtual bool IsPending() const = 0; | 41 virtual bool IsPending() const = 0; |
| 42 | 42 |
| 43 // Var override. | 43 // Var override. |
| 44 virtual ResourceVar* AsResourceVar() override; | 44 ResourceVar* AsResourceVar() override; |
| 45 virtual PP_VarType GetType() const override; | 45 PP_VarType GetType() const override; |
| 46 | 46 |
| 47 // Helper function that converts a PP_Var to a ResourceVar. This will | 47 // Helper function that converts a PP_Var to a ResourceVar. This will |
| 48 // return NULL if the PP_Var is not of Resource type. | 48 // return NULL if the PP_Var is not of Resource type. |
| 49 static ResourceVar* FromPPVar(PP_Var var); | 49 static ResourceVar* FromPPVar(PP_Var var); |
| 50 | 50 |
| 51 protected: | 51 protected: |
| 52 ResourceVar(); | 52 ResourceVar(); |
| 53 | 53 |
| 54 virtual ~ResourceVar(); | 54 ~ResourceVar() override; |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 DISALLOW_COPY_AND_ASSIGN(ResourceVar); | 57 DISALLOW_COPY_AND_ASSIGN(ResourceVar); |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 } // namespace ppapi | 60 } // namespace ppapi |
| 61 | 61 |
| 62 #endif // PPAPI_SHARED_IMPL_RESOURCE_VAR_H_ | 62 #endif // PPAPI_SHARED_IMPL_RESOURCE_VAR_H_ |
| OLD | NEW |