Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: chromeos/dbus/fake_power_manager_client.h

Issue 2496043004: Revert of Tablet-like power button behavior on Convertible/Tablet ChromeOS devices (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/wm/power_button_controller.cc ('k') | chromeos/dbus/fake_power_manager_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 CHROMEOS_DBUS_FAKE_POWER_MANAGER_CLIENT_H_ 5 #ifndef CHROMEOS_DBUS_FAKE_POWER_MANAGER_CLIENT_H_
6 #define CHROMEOS_DBUS_FAKE_POWER_MANAGER_CLIENT_H_ 6 #define CHROMEOS_DBUS_FAKE_POWER_MANAGER_CLIENT_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <string> 9 #include <string>
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // Pops the first report from |video_activity_reports_|, returning whether the 72 // Pops the first report from |video_activity_reports_|, returning whether the
73 // activity was fullscreen or not. There must be at least one report. 73 // activity was fullscreen or not. There must be at least one report.
74 bool PopVideoActivityReport(); 74 bool PopVideoActivityReport();
75 75
76 // Emulates the power manager announcing that the system is starting or 76 // Emulates the power manager announcing that the system is starting or
77 // completing a suspend attempt. 77 // completing a suspend attempt.
78 void SendSuspendImminent(); 78 void SendSuspendImminent();
79 void SendSuspendDone(); 79 void SendSuspendDone();
80 void SendDarkSuspendImminent(); 80 void SendDarkSuspendImminent();
81 81
82 // Emulates the power manager announcing that the system is changing
83 // brightness to |level|.
84 void SendBrightnessChanged(int level, bool user_initiated);
85
86 // Notifies observers that the power button has been pressed or released. 82 // Notifies observers that the power button has been pressed or released.
87 void SendPowerButtonEvent(bool down, const base::TimeTicks& timestamp); 83 void SendPowerButtonEvent(bool down, const base::TimeTicks& timestamp);
88 84
89 // Updates |props_| and notifies observers of its changes. 85 // Updates |props_| and notifies observers of its changes.
90 void UpdatePowerProperties( 86 void UpdatePowerProperties(
91 const power_manager::PowerSupplyProperties& power_props); 87 const power_manager::PowerSupplyProperties& power_props);
92 88
93 private: 89 private:
94 // Callback that will be run by asynchronous suspend delays to report 90 // Callback that will be run by asynchronous suspend delays to report
95 // readiness. 91 // readiness.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // Note: This should remain the last member so it'll be destroyed and 128 // Note: This should remain the last member so it'll be destroyed and
133 // invalidate its weak pointers before any other members are destroyed. 129 // invalidate its weak pointers before any other members are destroyed.
134 base::WeakPtrFactory<FakePowerManagerClient> weak_ptr_factory_; 130 base::WeakPtrFactory<FakePowerManagerClient> weak_ptr_factory_;
135 131
136 DISALLOW_COPY_AND_ASSIGN(FakePowerManagerClient); 132 DISALLOW_COPY_AND_ASSIGN(FakePowerManagerClient);
137 }; 133 };
138 134
139 } // namespace chromeos 135 } // namespace chromeos
140 136
141 #endif // CHROMEOS_DBUS_FAKE_POWER_MANAGER_CLIENT_H_ 137 #endif // CHROMEOS_DBUS_FAKE_POWER_MANAGER_CLIENT_H_
OLDNEW
« no previous file with comments | « ash/wm/power_button_controller.cc ('k') | chromeos/dbus/fake_power_manager_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698