summaryrefslogtreecommitdiffstats
path: root/ppapi/cpp/var.h
diff options
context:
space:
mode:
authoryzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-12 17:50:15 +0000
committeryzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-12 17:50:15 +0000
commit470020d2a3558be5acd4b74c29f0df38c9d9edd6 (patch)
tree8e172ee53536cdf024b8873fe7bc6b0c196c1667 /ppapi/cpp/var.h
parent34ee051a834b135745ab07374f838cc7381d908e (diff)
downloadchromium_src-470020d2a3558be5acd4b74c29f0df38c9d9edd6.zip
chromium_src-470020d2a3558be5acd4b74c29f0df38c9d9edd6.tar.gz
chromium_src-470020d2a3558be5acd4b74c29f0df38c9d9edd6.tar.bz2
Reland: Add C/C++ interfaces for PPB_Ext_Alarms_Dev and PPB_Ext_Events_Dev.
This CL also adds necessary C++ utilities to support these interfaces. An example of using these APIs: https://codereview.chromium.org/12387051/ BUG=None TEST=None The original CL is here: https://codereview.chromium.org/12295043/ Review URL: https://codereview.chromium.org/12755016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187610 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/cpp/var.h')
-rw-r--r--ppapi/cpp/var.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/ppapi/cpp/var.h b/ppapi/cpp/var.h
index 437eed9..d114054 100644
--- a/ppapi/cpp/var.h
+++ b/ppapi/cpp/var.h
@@ -55,11 +55,14 @@ class Var {
///
/// You will not normally need to use this constructor because
/// the reference count will not normally be incremented for you.
- Var(PassRef, PP_Var var) {
+ Var(PassRef, const PP_Var& var) {
var_ = var;
is_managed_ = true;
}
+ /// A constructor that increments the reference count.
+ explicit Var(const PP_Var& var);
+
struct DontManage {};
// TODO(brettw): remove DontManage when this bug is fixed
@@ -70,7 +73,7 @@ class Var {
/// increased or decreased by this class instance.
///
/// @param[in] var A <code>Var</code>.
- Var(DontManage, PP_Var var) {
+ Var(DontManage, const PP_Var& var) {
var_ = var;
is_managed_ = false;
}