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

Unified Diff: chrome/browser/renderer_host/pepper/pepper_output_protection_host.h

Issue 24039002: Pepper API implementation for output protection. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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: chrome/browser/renderer_host/pepper/pepper_output_protection_host.h
diff --git a/chrome/browser/renderer_host/pepper/pepper_output_protection_host.h b/chrome/browser/renderer_host/pepper/pepper_output_protection_host.h
new file mode 100644
index 0000000000000000000000000000000000000000..0ceb2d71f96bbfcf07fa70327ae92afb3be705da
--- /dev/null
+++ b/chrome/browser/renderer_host/pepper/pepper_output_protection_host.h
@@ -0,0 +1,50 @@
+// 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 CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_OUTPUT_PROTECTION_HOST_H_
+#define CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_OUTPUT_PROTECTION_HOST_H_
+
+#include "ppapi/host/host_message_context.h"
+#include "ppapi/host/resource_host.h"
+
+namespace content {
+class BrowserPpapiHost;
+} // namespace content
+
+namespace chrome {
+
+class PepperOutputProtectionHost
+ : public ppapi::host::ResourceHost {
+ public:
+ PepperOutputProtectionHost(content::BrowserPpapiHost* host,
+ PP_Instance instance,
+ PP_Resource resource);
+ virtual ~PepperOutputProtectionHost();
+
+ virtual int32_t OnResourceMessageReceived(
+ const IPC::Message& msg,
+ ppapi::host::HostMessageContext* context) OVERRIDE;
+
+ private:
+ int32_t OnQueryStatus(ppapi::host::HostMessageContext* context);
+ void QueryStatusOnUIThread(ppapi::host::ReplyMessageContext reply_context);
+ int32_t OnEnableProtection(ppapi::host::HostMessageContext* context,
+ uint32_t desired_method_mask);
+ void EnableProtectionOnUIThread(
+ ppapi::host::ReplyMessageContext reply_context,
+ uint32_t desired_method_mask,
+ bool with_callback);
+
+ void Close();
+
+ // Non-owning pointer.
+ content::BrowserPpapiHost* renderer_ppapi_host_;
+
+ DISALLOW_COPY_AND_ASSIGN(PepperOutputProtectionHost);
+};
+
+} // namespace chrome
+
+#endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_OUTPUT_PROTECTION_HOST_H_

Powered by Google App Engine
This is Rietveld 408576698