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

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: revise output configurator related code. rebased. 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 66edfda45d1d2f95982ecb7ce635dc70b6dcf60f..884efacf608f8e419522d5b2ae209d232730d023 100644
--- a/chromeos/display/real_output_configurator_delegate.h
+++ b/chromeos/display/real_output_configurator_delegate.h
@@ -5,6 +5,7 @@
#ifndef CHROMEOS_DISPLAY_REAL_OUTPUT_CONFIGURATOR_DELEGATE_H_
#define CHROMEOS_DISPLAY_REAL_OUTPUT_CONFIGURATOR_DELEGATE_H_
+#include <map>
#include <vector>
#include "base/basictypes.h"
@@ -52,8 +53,25 @@ class RealOutputConfiguratorDelegate : public OutputConfigurator::Delegate {
int touch_device_id,
const OutputConfigurator::CoordinateTransformation& ctm) OVERRIDE;
virtual void SendProjectingStateToPowerManager(bool projecting) OVERRIDE;
+ virtual bool QueryOutputProtectionStatus(
+ chromeos::OutputConfigurator::OutputProtectionClientId client_id,
+ uint32_t* link_mask,
+ uint32_t* protection_mask) OVERRIDE;
+ virtual bool EnableOutputProtection(
+ chromeos::OutputConfigurator::OutputProtectionClientId client_id,
+ uint32_t desired_method_mask) OVERRIDE;
Daniel Erat 2013/09/20 15:00:24 s/method/protection/
kcwu 2013/09/20 20:29:30 Done.
private:
+ // Mapping a client to its protection request bitmask.
+ typedef std::map<chromeos::OutputConfigurator::OutputProtectionClientId,
+ uint32_t> ProtectionRequests;
+
+ enum HDCPState {
+ HDCP_STATE_UNDESIRED,
+ HDCP_STATE_DESIRED,
+ HDCP_STATE_ENABLED
+ };
+
// Initializes |mode_info| to contain details corresponding to |mode|. Returns
// true on success.
bool InitModeInfo(RRMode mode, OutputConfigurator::ModeInfo* mode_info);
@@ -84,12 +102,26 @@ class RealOutputConfiguratorDelegate : public OutputConfigurator::Delegate {
void GetTouchscreens(
std::vector<OutputConfigurator::OutputSnapshot>* outputs);
+ // Get HDCP state of output.
Daniel Erat 2013/09/20 15:00:24 nit: s/Get/Gets/
kcwu 2013/09/20 20:29:30 Done.
+ bool GetHDCPState(RROutput id, HDCPState* state);
+
+ // Set HDCP state of output.
Daniel Erat 2013/09/20 15:00:24 nit: s/Set/Sets/
kcwu 2013/09/20 20:29:30 Done.
+ bool SetHDCPState(RROutput id, HDCPState state);
+
+ // Query output protection link type of output.
Daniel Erat 2013/09/20 15:00:24 nit: s/Query/Queries/
kcwu 2013/09/20 20:29:30 Done.
+ bool QueryOutputProtectionLinkType(
+ RROutput id,
+ OutputType *link_type);
Daniel Erat 2013/09/20 15:00:24 nit: move '*' to left side of space
kcwu 2013/09/20 20:29:30 Done.
+
Display* display_;
Window window_;
// Initialized when the server is grabbed and freed when it's ungrabbed.
XRRScreenResources* screen_;
+ // Output protection requests of each client.
+ ProtectionRequests client_protection_requests_;
+
DISALLOW_COPY_AND_ASSIGN(RealOutputConfiguratorDelegate);
};

Powered by Google App Engine
This is Rietveld 408576698