cros: remove TouchscreenEnabled local state
changes:
- Remove TouchscreenEnabledLocal
- Add ash::TouchscreenEnabledSource to replace bool parameter to
identify each enabled/disabled source.
- Instead, it becomes a member in chromeos::system::InputDeviceSettings
and gets initialized from powerd's backlights forced off state.
- Move instance of ash::PowerButtonDisplayController from
ash::TabletPowerButtonController to ash::PowerButtonController, so that
it is always constructed. Thus it removes the touchscreen enabled
status initialization dependency on ash::TabletPowerButtonController.
- modified test coverage to represent the change.
Test: covered by tests.
Bug: 759846
Change-Id: I9d29afff10b916893410a213ae76bcc42caaddfb
Reviewed-on: https://chromium-review.googlesource.com/640551
Commit-Queue: Qiang(Joe) Xu <[email protected]>
Reviewed-by: Dan Erat (OOO Fri-Mon) <[email protected]>
Reviewed-by: Dominic Battré <[email protected]>
Cr-Commit-Position: refs/heads/master@{#498992}
diff --git a/ash/shell_test_api.h b/ash/shell_test_api.h
index 30e5d3e..9320875 100644
--- a/ash/shell_test_api.h
+++ b/ash/shell_test_api.h
@@ -40,6 +40,10 @@
void OnLocalStatePrefServiceInitialized(
std::unique_ptr<PrefService> pref_service);
+ // Resets |shell_->power_button_controller_| to hold a new object to simulate
+ // Chrome starting.
+ void ResetPowerButtonControllerForTest();
+
private:
Shell* shell_; // not owned