Commit b2d9c05d authored by Daniel Nicoara's avatar Daniel Nicoara Committed by Chromium LUCI CQ

cast: Update DisplaySettingsManager's use of the NativeDisplayDelegate API

https://chromium-review.googlesource.com/c/chromium/src/+/2613152
updated the NativeDisplayDelegate API. Update the usecase to fix the
build.

Bug: b:177105618
Test: Build cast_shell internally
Change-Id: I9234a35d2dcdb6585dd1df6be8f650254eb7c01a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2622275
Commit-Queue: Gil Dekel <gildekel@chromium.org>
Commit-Queue: Daniel Nicoara <dnicoara@chromium.org>
Reviewed-by: default avatarGil Dekel <gildekel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#842084}
parent d389dfbe
......@@ -29,17 +29,6 @@ const float kMinApiBrightness = 0.0f;
const float kMaxApiBrightness = 1.0f;
const float kDefaultApiBrightness = kMaxApiBrightness;
#if defined(USE_AURA)
bool CheckDisplayStatus(const base::flat_map<int64_t, bool>& statuses) {
for (const auto& status : statuses) {
if (!status.second) {
return false;
}
}
return true;
}
#endif // defined(USE_AURA)
} // namespace
DisplaySettingsManagerImpl::DisplaySettingsManagerImpl(
......@@ -109,15 +98,13 @@ void DisplaySettingsManagerImpl::AddReceiver(
void DisplaySettingsManagerImpl::SetScreenPowerOn(PowerToggleCallback callback) {
#if defined(USE_AURA)
display_configurator_->EnableDisplay(
base::BindOnce(&CheckDisplayStatus).Then(std::move(callback)));
display_configurator_->EnableDisplay(std::move(callback));
#endif // defined(USE_AURA)
}
void DisplaySettingsManagerImpl::SetScreenPowerOff(PowerToggleCallback callback) {
#if defined(USE_AURA)
display_configurator_->DisableDisplay(
base::BindOnce(&CheckDisplayStatus).Then(std::move(callback)));
display_configurator_->DisableDisplay(std::move(callback));
#endif // defined(USE_AURA)
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment