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

Side by Side Diff: ppapi/cpp/var_resource.h

Issue 148213016: [PPAPI] Moving pp::VarResource_Dev API into pp::Var (now stable). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 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_CPP_VAR_RESOURCE_DEV_H_ 5 #ifndef PPAPI_CPP_VAR_RESOURCE_H_
6 #define PPAPI_CPP_VAR_RESOURCE_DEV_H_ 6 #define PPAPI_CPP_VAR_RESOURCE_H_
7 7
8 #include "ppapi/cpp/resource.h" 8 #include "ppapi/cpp/resource.h"
9 #include "ppapi/cpp/var.h" 9 #include "ppapi/cpp/var.h"
10 10
11 /// @file 11 /// @file
12 /// This file defines the API for interacting with resource vars. 12 /// This file defines the API for interacting with resource vars.
13 13
14 namespace pp { 14 namespace pp {
15 15
16 class VarResource_Dev : public Var { 16 class VarResource : public Var {
17 public: 17 public:
18 /// Constructs a <code>VarResource_Dev</code> given a resource. 18 /// Constructs a <code>VarResource</code> given a resource.
19 explicit VarResource_Dev(const pp::Resource& resource); 19 explicit VarResource(const pp::Resource& resource);
20 20
21 /// Constructs a <code>VarResource_Dev</code> given a var for which 21 /// Constructs a <code>VarResource</code> given a var for which is_resource()
22 /// is_resource() is true. This will refer to the same resource var, but allow 22 /// is true. This will refer to the same resource var, but allow you to access
23 /// you to access methods specific to resources. 23 /// methods specific to resources.
24 /// 24 ///
25 /// @param[in] var A resource var. 25 /// @param[in] var A resource var.
26 explicit VarResource_Dev(const Var& var); 26 explicit VarResource(const Var& var);
27 27
28 /// Copy constructor. 28 /// Copy constructor.
29 VarResource_Dev(const VarResource_Dev& other); 29 VarResource(const VarResource& other);
30 30
31 virtual ~VarResource_Dev(); 31 virtual ~VarResource();
32 32
33 /// Assignment operator. 33 /// Assignment operator.
34 VarResource_Dev& operator=(const VarResource_Dev& other); 34 VarResource& operator=(const VarResource& other);
35 35
36 /// The <code>Var</code> assignment operator is overridden here so that we can 36 /// The <code>Var</code> assignment operator is overridden here so that we can
37 /// check for assigning a non-resource var to a <code>VarResource_Dev</code>. 37 /// check for assigning a non-resource var to a <code>VarResource</code>.
38 /// 38 ///
39 /// @param[in] other The resource var to be assigned. 39 /// @param[in] other The resource var to be assigned.
40 /// 40 ///
41 /// @return The resulting <code>VarResource_Dev</code> (as a 41 /// @return The resulting <code>VarResource</code> (as a
42 /// <code>Var</code>&). 42 /// <code>Var</code>&).
43 virtual Var& operator=(const Var& other); 43 virtual Var& operator=(const Var& other);
44 44
45 /// Gets the resource contained in the var. 45 /// Gets the resource contained in the var.
46 /// 46 ///
47 /// @return The <code>pp::Resource</code> that is contained in the var. 47 /// @return The <code>pp::Resource</code> that is contained in the var.
48 pp::Resource AsResource(); 48 pp::Resource AsResource();
49 }; 49 };
50 50
51 } // namespace pp 51 } // namespace pp
52 52
53 #endif // PPAPI_CPP_VAR_RESOURCE_DEV_H_ 53 #endif // PPAPI_CPP_VAR_RESOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698