OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_ARC_POWER_ARC_POWER_BRIDGE_H_ | 5 #ifndef COMPONENTS_ARC_POWER_ARC_POWER_BRIDGE_H_ |
6 #define COMPONENTS_ARC_POWER_ARC_POWER_BRIDGE_H_ | 6 #define COMPONENTS_ARC_POWER_ARC_POWER_BRIDGE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 23 matching lines...) Expand all Loading... | |
34 void OnInstanceReady() override; | 34 void OnInstanceReady() override; |
35 void OnInstanceClosed() override; | 35 void OnInstanceClosed() override; |
36 | 36 |
37 // chromeos::PowerManagerClient::Observer overrides. | 37 // chromeos::PowerManagerClient::Observer overrides. |
38 void SuspendImminent() override; | 38 void SuspendImminent() override; |
39 void SuspendDone(const base::TimeDelta& sleep_duration) override; | 39 void SuspendDone(const base::TimeDelta& sleep_duration) override; |
40 | 40 |
41 // DisplayConfigurator::Observer overrides. | 41 // DisplayConfigurator::Observer overrides. |
42 void OnPowerStateChanged(chromeos::DisplayPowerState power_state) override; | 42 void OnPowerStateChanged(chromeos::DisplayPowerState power_state) override; |
43 | 43 |
44 // PowerManagerClient::Observer overrides. | |
45 void NotifyBrightnessChange(double percent) override; | |
Muyuan
2017/04/05 18:41:11
Just override BrightnessChanged.
yueli
2017/04/05 19:59:47
Done.
| |
46 | |
44 // mojom::PowerHost overrides. | 47 // mojom::PowerHost overrides. |
45 void OnAcquireDisplayWakeLock(mojom::DisplayWakeLockType type) override; | 48 void OnAcquireDisplayWakeLock(mojom::DisplayWakeLockType type) override; |
46 void OnReleaseDisplayWakeLock(mojom::DisplayWakeLockType type) override; | 49 void OnReleaseDisplayWakeLock(mojom::DisplayWakeLockType type) override; |
47 void IsDisplayOn(const IsDisplayOnCallback& callback) override; | 50 void IsDisplayOn(const IsDisplayOnCallback& callback) override; |
51 void SetBrightness(int32_t brightness) override; | |
52 void SyncBrightness() override; | |
48 | 53 |
49 private: | 54 private: |
50 void ReleaseAllDisplayWakeLocks(); | 55 void ReleaseAllDisplayWakeLocks(); |
51 | 56 |
52 mojo::Binding<mojom::PowerHost> binding_; | 57 mojo::Binding<mojom::PowerHost> binding_; |
53 | 58 |
54 // Stores a mapping of type -> wake lock ID for all wake locks | 59 // Stores a mapping of type -> wake lock ID for all wake locks |
55 // held by ARC. | 60 // held by ARC. |
56 std::multimap<mojom::DisplayWakeLockType, int> wake_locks_; | 61 std::multimap<mojom::DisplayWakeLockType, int> wake_locks_; |
57 | 62 |
58 DISALLOW_COPY_AND_ASSIGN(ArcPowerBridge); | 63 DISALLOW_COPY_AND_ASSIGN(ArcPowerBridge); |
59 }; | 64 }; |
60 | 65 |
61 } // namespace arc | 66 } // namespace arc |
62 | 67 |
63 #endif // COMPONENTS_ARC_POWER_ARC_POWER_BRIDGE_H_ | 68 #endif // COMPONENTS_ARC_POWER_ARC_POWER_BRIDGE_H_ |
OLD | NEW |