summaryrefslogtreecommitdiffstats
path: root/chromeos/display/output_configurator.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromeos/display/output_configurator.h')
-rw-r--r--chromeos/display/output_configurator.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/chromeos/display/output_configurator.h b/chromeos/display/output_configurator.h
index 3491344..ef5085e 100644
--- a/chromeos/display/output_configurator.h
+++ b/chromeos/display/output_configurator.h
@@ -68,6 +68,7 @@ class CHROMEOS_EXPORT OutputConfigurator
public base::MessagePumpObserver {
public:
typedef uint64_t OutputProtectionClientId;
+ static const OutputProtectionClientId kInvalidClientId = 0;
struct ModeInfo {
ModeInfo();
@@ -413,6 +414,7 @@ class CHROMEOS_EXPORT OutputConfigurator
// Returns true on success.
bool QueryOutputProtectionStatus(
OutputProtectionClientId client_id,
+ int64 display_id,
uint32_t* link_mask,
uint32_t* protection_mask);
@@ -422,12 +424,15 @@ class CHROMEOS_EXPORT OutputConfigurator
// Returns true when the protection request has been made.
bool EnableOutputProtection(
OutputProtectionClientId client_id,
+ int64 display_id,
uint32_t desired_protection_mask);
private:
- // Mapping a client to its protection request bitmask.
- typedef std::map<chromeos::OutputConfigurator::OutputProtectionClientId,
- uint32_t> ProtectionRequests;
+ // Mapping a display_id to a protection request bitmask.
+ typedef std::map<int64, uint32_t> DisplayProtections;
+ // Mapping a client to its protection request.
+ typedef std::map<OutputProtectionClientId,
+ DisplayProtections> ProtectionRequests;
// Updates |cached_outputs_| to contain currently-connected outputs. Calls
// |delegate_->GetOutputs()| and then does additional work, like finding the
@@ -487,6 +492,9 @@ class CHROMEOS_EXPORT OutputConfigurator
float GetMirroredDisplayAreaRatio(
const OutputConfigurator::OutputSnapshot& output);
+ // Applies output protections according to requests.
+ bool ApplyProtections(const DisplayProtections& requests);
+
StateController* state_controller_;
SoftwareMirroringController* mirroring_controller_;
scoped_ptr<Delegate> delegate_;