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

Unified Diff: ppapi/proxy/output_protection_resource.h

Issue 24039002: Pepper API implementation for output protection. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: avoid PostTask methods in dtor Created 7 years, 3 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: ppapi/proxy/output_protection_resource.h
diff --git a/ppapi/proxy/output_protection_resource.h b/ppapi/proxy/output_protection_resource.h
new file mode 100644
index 0000000000000000000000000000000000000000..877f1f2424d746c63ea3eb996e10c8bff8cb3be9
--- /dev/null
+++ b/ppapi/proxy/output_protection_resource.h
@@ -0,0 +1,55 @@
+// Copyright 2013 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_PROXY_OUTPUT_PROTECTION_RESOURCE_H_
+#define PPAPI_PROXY_OUTPUT_PROTECTION_RESOURCE_H_
+
+#include "base/compiler_specific.h"
+#include "ppapi/c/private/ppb_output_protection_private.h"
+#include "ppapi/proxy/device_enumeration_resource_helper.h"
+#include "ppapi/proxy/plugin_resource.h"
+#include "ppapi/thunk/ppb_output_protection_api.h"
+
+namespace ppapi {
+namespace proxy {
+
+class OutputProtectionResource
+ : public PluginResource,
+ public ::ppapi::thunk::PPB_OutputProtection_API {
+ public:
+ OutputProtectionResource(Connection connection,
+ PP_Instance instance);
+ virtual ~OutputProtectionResource();
dmichael (off chromium) 2013/09/09 20:37:15 nit: the destructor and below can be private.
kcwu 2013/09/10 12:50:21 Done. It compiles but I don't understand. This cla
dmichael (off chromium) 2013/09/11 18:22:45 Not everyone in Chromium likes to do it this way,
kcwu 2013/09/12 18:22:08 Done.
+
+ // PluginResource overrides.
+ virtual thunk::PPB_OutputProtection_API* AsPPB_OutputProtection_API()
+ OVERRIDE;
+
+ // PPB_OutputProtection_API implementation.
+ virtual int32_t QueryStatus(uint32_t* link_mask, uint32_t* protection_mask,
+ scoped_refptr<TrackedCallback> callback) OVERRIDE;
+ virtual int32_t EnableProtection(
+ uint32_t desired_method_mask,
+ scoped_refptr<TrackedCallback> callback) OVERRIDE;
+
+ private:
+ void OnPluginMsgQueryStatusReply(
+ const ResourceMessageReplyParams& params,
+ uint32_t link_mask,
+ uint32_t protection_mask);
+ void OnPluginMsgEnableProtectionReply(
+ const ResourceMessageReplyParams& params);
+
+ uint32_t* link_mask_;
+ uint32_t* protection_mask_;
+ scoped_refptr<TrackedCallback> query_status_callback_;
+ scoped_refptr<TrackedCallback> enable_protection_callback_;
+
+ DISALLOW_COPY_AND_ASSIGN(OutputProtectionResource);
+};
+
+} // namespace proxy
+} // namespace ppapi
+
+#endif // PPAPI_PROXY_OUTPUT_PROTECTION_RESOURCE_H_

Powered by Google App Engine
This is Rietveld 408576698