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

Unified Diff: chromeos/display/real_output_configurator_delegate.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: chromeos/display/real_output_configurator_delegate.h
diff --git a/chromeos/display/real_output_configurator_delegate.h b/chromeos/display/real_output_configurator_delegate.h
index 2753ae55ffb19c778613eab77193abb8467c1699..95bedd273ccf6bb57ea97e3c951289b778f8b07e 100644
--- a/chromeos/display/real_output_configurator_delegate.h
+++ b/chromeos/display/real_output_configurator_delegate.h
@@ -5,11 +5,13 @@
#ifndef CHROMEOS_DISPLAY_REAL_OUTPUT_CONFIGURATOR_DELEGATE_H_
#define CHROMEOS_DISPLAY_REAL_OUTPUT_CONFIGURATOR_DELEGATE_H_
+#include <map>
#include <vector>
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "chromeos/display/output_configurator.h"
+#include "ppapi/c/private/ppb_output_protection_private.h"
typedef XID Window;
@@ -20,6 +22,10 @@ typedef _XRROutputInfo XRROutputInfo;
struct _XRRScreenResources;
typedef _XRRScreenResources XRRScreenResources;
+namespace chrome {
+class PepperOutputProtectionHost;
+} // namespace chrome
+
namespace chromeos {
class RealOutputConfiguratorDelegate : public OutputConfigurator::Delegate {
@@ -53,8 +59,24 @@ class RealOutputConfiguratorDelegate : public OutputConfigurator::Delegate {
int touch_device_id,
const OutputConfigurator::CoordinateTransformation& ctm) OVERRIDE;
virtual void SendProjectingStateToPowerManager(bool projecting) OVERRIDE;
+ virtual bool QueryOutputProtectionStatus(
+ chrome::PepperOutputProtectionHost* client,
+ uint32_t* link_mask,
+ uint32_t* protection_mask) OVERRIDE;
+ virtual bool EnableOutputProtection(
+ chrome::PepperOutputProtectionHost* client,
+ uint32_t desired_method_mask) OVERRIDE;
private:
+ typedef std::map<chrome::PepperOutputProtectionHost*, uint32_t>
+ ProtectionRequests;
dmichael (off chromium) 2013/09/09 20:37:15 You might want IDMap instead. That would get rid o
kcwu 2013/09/10 12:50:21 IDMap looks good. What do you suggest how to use I
dmichael (off chromium) 2013/09/11 18:22:45 I was suggesting using IDMap here, and you can hav
kcwu 2013/09/12 18:22:08 How about void* as Dale suggested? I would modify
+
+ enum HDCPState {
+ HDCP_State_Undesired,
+ HDCP_State_Desired,
+ HDCP_State_Enabled
+ };
+
// Gets details corresponding to |mode|. Parameters may be NULL. Returns
// true on success.
bool GetModeDetails(RRMode mode, int* width, int* height, bool* interlaced);
@@ -105,6 +127,20 @@ class RealOutputConfiguratorDelegate : public OutputConfigurator::Delegate {
void GetTouchscreens(
std::vector<OutputConfigurator::OutputSnapshot>* outputs);
+ // Get HDCP state of output.
+ bool GetHDCPState(RROutput id, HDCPState* state);
+ // Set HDCP state of output.
+ bool SetHDCPState(RROutput id, HDCPState state);
+ // Get types of connected output links.
+ bool GetOutputLinkType(
+ std::vector<PP_OutputProtectionLinkType_Private>& link_type);
+ // Get the bit-mask of connected output links.
+ bool GetOutputLinkMask(uint32_t* link_mask);
+ // Get the bit-mask of enabled protection methods.
+ bool GetProtectionMethods(uint32_t* protection_mask);
+ // Get the bit-mask of all requested protection methods.
+ uint32_t GetCombinedProtectionRequest();
+
Display* display_;
Window window_;
@@ -114,6 +150,9 @@ class RealOutputConfiguratorDelegate : public OutputConfigurator::Delegate {
// Used to enable modes which rely on panel fitting.
bool is_panel_fitting_enabled_;
+ // Output protection requests of each client.
+ ProtectionRequests client_protection_request_;
+
DISALLOW_COPY_AND_ASSIGN(RealOutputConfiguratorDelegate);
};

Powered by Google App Engine
This is Rietveld 408576698