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

Unified Diff: ppapi/cpp/private/x509_certificate_private.h

Issue 9693024: Add the PPAPI X509 Certificate interface and implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/c/private/ppb_x509_certificate_private.h ('k') | ppapi/cpp/private/x509_certificate_private.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/private/x509_certificate_private.h
diff --git a/ppapi/cpp/private/x509_certificate_private.h b/ppapi/cpp/private/x509_certificate_private.h
new file mode 100644
index 0000000000000000000000000000000000000000..5b316b4216aaf2c3bfc81991ba772a20a291c54a
--- /dev/null
+++ b/ppapi/cpp/private/x509_certificate_private.h
@@ -0,0 +1,35 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef PPAPI_CPP_PRIVATE_X509_CERTIFICATE_PRIVATE_H_
+#define PPAPI_CPP_PRIVATE_X509_CERTIFICATE_PRIVATE_H_
+
+#include "ppapi/c/pp_stdint.h"
+#include "ppapi/c/private/ppb_x509_certificate_private.h"
+#include "ppapi/cpp/resource.h"
+
+namespace pp {
+
+class Var;
+
+class X509Certificate : public Resource {
+ public:
+ // Creates an is_null() object.
+ X509Certificate();
+ explicit X509Certificate(PP_Resource resource);
+ explicit X509Certificate(const InstanceHandle& instance);
+
+ // Returns true if the required interface is available.
+ static bool IsAvailable();
+
+ // Creates a new certificate from a DER-encoded representation. Returns true
+ // if the certificate was successfully created.
+ bool Initialize(const char* bytes, uint32_t length);
+ // Returns the specified field as a |Var|.
+ Var GetField(PP_X509Certificate_Private_Field field) const;
+};
+
+} // namespace pp
+
+#endif // PPAPI_CPP_PRIVATE_X509_CERTIFICATE_PRIVATE_H_
« no previous file with comments | « ppapi/c/private/ppb_x509_certificate_private.h ('k') | ppapi/cpp/private/x509_certificate_private.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698