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

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: tweaks conditional compile conditions 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..dbbf6e26aea18af6be14d32792bc4422036fc99a 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(
+ const chrome::PepperOutputProtectionHost* client,
+ uint32_t* link_mask,
+ uint32_t* protection_mask) OVERRIDE;
+ virtual bool EnableOutputProtection(
+ const chrome::PepperOutputProtectionHost* client,
+ uint32_t desired_method_mask) OVERRIDE;
private:
+ typedef std::map<const chrome::PepperOutputProtectionHost*, uint32_t>
ddorwin 2013/09/12 04:22:13 Maybe explain the two values.
kcwu 2013/09/12 18:22:08 Done.
+ ProtectionRequests;
+
+ 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,24 @@ 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 GetOutputLinkTypes(
+ std::vector<PP_OutputProtectionLinkType_Private>* link_type);
+ // Get the bit-mask of connected output links.
+ bool GetOutputLinkMask(
+ const std::vector<PP_OutputProtectionLinkType_Private>& link_types,
+ uint32_t* link_mask);
+ // Get the bit-mask of enabled protection methods.
+ bool GetProtectionMethods(
ddorwin 2013/09/12 04:22:13 While the above method might be useful on its own
kcwu 2013/09/12 18:22:08 These methods are rewritten and restructured.
+ const std::vector<PP_OutputProtectionLinkType_Private>& link_types,
+ uint32_t* protection_mask);
+ // Get the bit-mask of all requested protection methods.
ddorwin 2013/09/12 04:22:13 I didn't understand what this function did (from t
kcwu 2013/09/12 18:22:08 These methods are rewritten.
+ uint32_t GetCombinedProtectionRequest();
+
Display* display_;
Window window_;
@@ -114,6 +154,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_;
ddorwin 2013/09/12 04:22:13 ...requests_ ^
kcwu 2013/09/12 18:22:08 Done.
+
DISALLOW_COPY_AND_ASSIGN(RealOutputConfiguratorDelegate);
};

Powered by Google App Engine
This is Rietveld 408576698