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

Unified Diff: webkit/plugins/ppapi/ppb_flash_x509_certificate_impl.cc

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
Index: webkit/plugins/ppapi/ppb_flash_x509_certificate_impl.cc
diff --git a/webkit/plugins/ppapi/ppb_flash_x509_certificate_impl.cc b/webkit/plugins/ppapi/ppb_flash_x509_certificate_impl.cc
new file mode 100644
index 0000000000000000000000000000000000000000..e446b75b034dd06c929fd4f8f31e29f1eed48956
--- /dev/null
+++ b/webkit/plugins/ppapi/ppb_flash_x509_certificate_impl.cc
@@ -0,0 +1,40 @@
+// 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.
+
+#include "webkit/plugins/ppapi/ppb_flash_x509_certificate_impl.h"
+
+#include "webkit/plugins/ppapi/plugin_delegate.h"
+#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
+#include "webkit/plugins/ppapi/resource_helper.h"
+
+namespace webkit {
+namespace ppapi {
+
+// static
+PP_Resource PPB_Flash_X509Certificate_Impl::CreateResource(
+ PP_Instance instance) {
+ return (new PPB_Flash_X509Certificate_Impl(
+ ::ppapi::OBJECT_IS_IMPL, instance))->GetReference();
+}
+
+PPB_Flash_X509Certificate_Impl::PPB_Flash_X509Certificate_Impl(
+ ::ppapi::ResourceObjectType type, PP_Instance instance) :
+ PPB_Flash_X509Certificate_Shared(type, instance) {
+}
+
+bool PPB_Flash_X509Certificate_Impl::ParseDER(const std::vector<char>& der,
+ ::ppapi::PPB_X509Certificate_Fields* result) {
yzshen1 2012/03/22 23:32:40 Wrong indent.
raymes 2012/03/26 16:05:57 Done.
+ PluginDelegate* plugin_delegate = ResourceHelper::GetPluginDelegate(this);
+ if (!plugin_delegate) {
yzshen1 2012/03/22 23:32:40 {} is not necessary.
raymes 2012/03/26 16:05:57 Done.
+ return false;
+ }
+
+ return plugin_delegate->X509CertificateParseDER(der, result);
+}
+
+PPB_Flash_X509Certificate_Impl::~PPB_Flash_X509Certificate_Impl() {
+}
+
+} // namespace ppapi
+} // namespace webkit

Powered by Google App Engine
This is Rietveld 408576698