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

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

Issue 2474913004: Tablet-like power button behavior on Convertible/Tablet ChromeOS devices (Closed)
Patch Set: nits 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
82 // Notifies observers that the power button has been pressed or released. 86 // Notifies observers that the power button has been pressed or released.
83 void SendPowerButtonEvent(bool down, const base::TimeTicks& timestamp); 87 void SendPowerButtonEvent(bool down, const base::TimeTicks& timestamp);
84 88
85 // Updates |props_| and notifies observers of its changes. 89 // Updates |props_| and notifies observers of its changes.
86 void UpdatePowerProperties( 90 void UpdatePowerProperties(
87 const power_manager::PowerSupplyProperties& power_props); 91 const power_manager::PowerSupplyProperties& power_props);
88 92
89 private: 93 private:
90 // Callback that will be run by asynchronous suspend delays to report 94 // Callback that will be run by asynchronous suspend delays to report
91 // readiness. 95 // readiness.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // Note: This should remain the last member so it'll be destroyed and 132 // Note: This should remain the last member so it'll be destroyed and
129 // invalidate its weak pointers before any other members are destroyed. 133 // invalidate its weak pointers before any other members are destroyed.
130 base::WeakPtrFactory<FakePowerManagerClient> weak_ptr_factory_; 134 base::WeakPtrFactory<FakePowerManagerClient> weak_ptr_factory_;
131 135
132 DISALLOW_COPY_AND_ASSIGN(FakePowerManagerClient); 136 DISALLOW_COPY_AND_ASSIGN(FakePowerManagerClient);
133 }; 137 };
134 138
135 } // namespace chromeos 139 } // namespace chromeos
136 140
137 #endif // CHROMEOS_DBUS_FAKE_POWER_MANAGER_CLIENT_H_ 141 #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