Chromium Code Reviews| Index: ui/display/chromeos/display_configurator.h |
| diff --git a/ui/display/chromeos/display_configurator.h b/ui/display/chromeos/display_configurator.h |
| index 88eab83b4db146f787a5fd377878e792c76ed0a6..2da7934af1b73c0ef195a64766d018cb4360d3ae 100644 |
| --- a/ui/display/chromeos/display_configurator.h |
| +++ b/ui/display/chromeos/display_configurator.h |
| @@ -42,6 +42,16 @@ class DISPLAY_EXPORT DisplayConfigurator : public NativeDisplayObserver { |
| typedef base::Callback<void(bool)> ConfigurationCallback; |
| + typedef base::Callback<void(bool /* success */)> EnableProtectionCallback; |
| + |
| + // |link_mask| is the type of connected display links, which is a bitmask of |
| + // DisplayConnectionType values. |protection_mask| is the desired protection |
| + // methods, which is a bitmask of the ContentProtectionMethod values. |
| + typedef base::Callback<void(bool /* success */, |
| + uint32_t /* link_mask */, |
| + uint32_t /* protection_mask */)> |
|
oshima
2015/04/02 16:00:51
It may be better to define struct instead of using
dnicoara
2015/04/14 20:15:43
Done.
|
| + QueryProtectionCallback; |
| + |
| typedef std::vector<DisplaySnapshot*> DisplayStateList; |
| class Observer { |
| @@ -240,23 +250,20 @@ class DISPLAY_EXPORT DisplayConfigurator : public NativeDisplayObserver { |
| // Unregisters the client. |
| void UnregisterContentProtectionClient(ContentProtectionClientId client_id); |
| - // Queries link status and protection status. |
| - // |link_mask| is the type of connected display links, which is a bitmask of |
| - // DisplayConnectionType values. |protection_mask| is the desired protection |
| - // methods, which is a bitmask of the ContentProtectionMethod values. |
| - // Returns true on success. |
| - bool QueryContentProtectionStatus(ContentProtectionClientId client_id, |
| + // Queries link status and protection status. |callback| is used to respond |
| + // to the query. |
| + void QueryContentProtectionStatus(ContentProtectionClientId client_id, |
| int64_t display_id, |
| - uint32_t* link_mask, |
| - uint32_t* protection_mask); |
| + const QueryProtectionCallback& callback); |
| // Requests the desired protection methods. |
| // |protection_mask| is the desired protection methods, which is a bitmask |
| // of the ContentProtectionMethod values. |
| // Returns true when the protection request has been made. |
| - bool EnableContentProtection(ContentProtectionClientId client_id, |
| + void EnableContentProtection(ContentProtectionClientId client_id, |
| int64_t display_id, |
| - uint32_t desired_protection_mask); |
| + uint32_t protection_mask, |
| + const EnableProtectionCallback& callback); |
| // Checks the available color profiles for |display_id| and fills the result |
| // into |profiles|. |