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

Unified Diff: chromeos/display/output_configurator.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/output_configurator.h
diff --git a/chromeos/display/output_configurator.h b/chromeos/display/output_configurator.h
index 5891785381cb22161e41415a98e62b8fd00679b1..45e94379d90bdef2c322d67d7761624caca01f12 100644
--- a/chromeos/display/output_configurator.h
+++ b/chromeos/display/output_configurator.h
@@ -25,6 +25,10 @@ typedef XID RROutput;
typedef XID RRCrtc;
typedef XID RRMode;
+namespace chrome {
+class PepperOutputProtectionHost;
+} // namespace chrome
+
namespace chromeos {
// Used to describe the state of a multi-display configuration.
@@ -218,6 +222,18 @@ class CHROMEOS_EXPORT OutputConfigurator
// Sends a D-Bus message to the power manager telling it that the
// machine is or is not projecting.
virtual void SendProjectingStateToPowerManager(bool projecting) = 0;
+
+ // Query link status and protection status. Returns true on success.
+ virtual bool QueryOutputProtectionStatus(
+ const chrome::PepperOutputProtectionHost* client,
DaleCurtis 2013/09/12 01:23:13 Why not just use a void* if you don't intend to ac
kcwu 2013/09/12 18:22:08 Done.
dmichael (off chromium) 2013/09/12 20:10:15 This is better, but my preference is still for an
kcwu 2013/09/16 11:57:37 Done. I changed my code to register for an integer
+ uint32_t* link_mask,
+ uint32_t* protection_mask) = 0;
+
+ // Set desired protection methods. Returns true when the protection request
ddorwin 2013/09/12 04:22:13 s/Set/Request the/
kcwu 2013/09/12 18:22:08 Done.
+ // has been made.
+ virtual bool EnableOutputProtection(
+ const chrome::PepperOutputProtectionHost* client,
+ uint32_t desired_method_mask) = 0;
};
// Helper class used by tests.
@@ -348,6 +364,25 @@ class CHROMEOS_EXPORT OutputConfigurator
// so that time-consuming ConfigureOutputs() won't be called multiple times.
void ScheduleConfigureOutputs();
+ // Query link status and protection status.
+ // |link_mask| is the type of connected output links, which is a bit-mask
ddorwin 2013/09/12 04:22:13 nit: "bit mask" is 5x more common in the Chromium
kcwu 2013/09/12 18:22:08 Done.
+ // of PP_OutputProtectionLinkType_Private values. |protection_mask| is the
+ // desired protection methods, which is a bit-mask of the
+ // PP_OutputProtectionMethod_Private values.
+ // Returns true on success.
+ virtual bool QueryOutputProtectionStatus(
+ const chrome::PepperOutputProtectionHost* client,
+ uint32_t* link_mask,
+ uint32_t* protection_mask);
DaleCurtis 2013/09/12 01:23:13 OVERRIDE?
kcwu 2013/09/12 18:22:08 Done.
kcwu 2013/09/16 11:57:37 I found these methods are not override, so I rever
+
+ // Set desired protection methods.
+ // |protection_mask| is the desired protection methods, which is a bit-mask
+ // of the PP_OutputProtectionMethod_Private values.
+ // Returns true when the protection request has been made.
+ virtual bool EnableOutputProtection(
+ const chrome::PepperOutputProtectionHost* client,
+ uint32_t desired_method_mask);
DaleCurtis 2013/09/12 01:23:13 Ditto?
kcwu 2013/09/12 18:22:08 Done.
+
private:
// Configure outputs.
void ConfigureOutputs();

Powered by Google App Engine
This is Rietveld 408576698