summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/ppapi_param_traits.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-02 18:12:41 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-02 18:12:41 +0000
commit195d4cde0da1d590ea978da9e532feceebe12ec1 (patch)
treef93460315e38383d74dcb46590275ef989b40caa /ppapi/proxy/ppapi_param_traits.cc
parent8a56410423d622cf586c7587f6c3634d391254d7 (diff)
downloadchromium_src-195d4cde0da1d590ea978da9e532feceebe12ec1.zip
chromium_src-195d4cde0da1d590ea978da9e532feceebe12ec1.tar.gz
chromium_src-195d4cde0da1d590ea978da9e532feceebe12ec1.tar.bz2
Hook up PpapiPermissions in more places.
This doesn't actually do much more checking of the permissions, but it should wire it up everywhere we'll need it. It will also at least only return public interfaces via GetInterface in the proxy now unless other bits are supplied. Review URL: https://codereview.chromium.org/10984094 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159729 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/ppapi_param_traits.cc')
-rw-r--r--ppapi/proxy/ppapi_param_traits.cc23
1 files changed, 23 insertions, 0 deletions
diff --git a/ppapi/proxy/ppapi_param_traits.cc b/ppapi/proxy/ppapi_param_traits.cc
index 2858eaf..1c1ddbe 100644
--- a/ppapi/proxy/ppapi_param_traits.cc
+++ b/ppapi/proxy/ppapi_param_traits.cc
@@ -312,6 +312,29 @@ void ParamTraits< std::vector<ppapi::PPB_FileRef_CreateInfo> >::Log(
std::string* l) {
}
+// ppapi::PpapiPermissions -----------------------------------------------------
+
+void ParamTraits<ppapi::PpapiPermissions>::Write(Message* m,
+ const param_type& p) {
+ ParamTraits<uint32_t>::Write(m, p.GetBits());
+}
+
+// static
+bool ParamTraits<ppapi::PpapiPermissions>::Read(const Message* m,
+ PickleIterator* iter,
+ param_type* r) {
+ uint32_t bits;
+ if (!ParamTraits<uint32_t>::Read(m, iter, &bits))
+ return false;
+ *r = ppapi::PpapiPermissions(bits);
+ return true;
+}
+
+// static
+void ParamTraits<ppapi::PpapiPermissions>::Log(const param_type& p,
+ std::string* l) {
+}
+
// SerializedHandle ------------------------------------------------------------
// static