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

Side by Side Diff: ash/wm/power_button_controller.h

Issue 9264025: aura: Replace UI-feature GYP flags with switches. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 8 years, 11 months 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 | Annotate | Revision Log
« no previous file with comments | « ash/shell.cc ('k') | ash/wm/power_button_controller.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 ASH_WM_POWER_BUTTON_CONTROLLER_H_ 5 #ifndef ASH_WM_POWER_BUTTON_CONTROLLER_H_
6 #define ASH_WM_POWER_BUTTON_CONTROLLER_H_ 6 #define ASH_WM_POWER_BUTTON_CONTROLLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ash/ash_export.h" 9 #include "ash/ash_export.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 DISALLOW_COPY_AND_ASSIGN(TestApi); 125 DISALLOW_COPY_AND_ASSIGN(TestApi);
126 }; 126 };
127 127
128 PowerButtonController(); 128 PowerButtonController();
129 virtual ~PowerButtonController(); 129 virtual ~PowerButtonController();
130 130
131 void set_delegate(PowerButtonControllerDelegate* delegate) { 131 void set_delegate(PowerButtonControllerDelegate* delegate) {
132 delegate_.reset(delegate); 132 delegate_.reset(delegate);
133 } 133 }
134 134
135 void set_has_legacy_power_button_for_test(bool legacy) {
136 has_legacy_power_button_ = legacy;
137 }
138
135 // Called when the user logs in. 139 // Called when the user logs in.
136 void OnLoginStateChange(bool logged_in, bool is_guest); 140 void OnLoginStateChange(bool logged_in, bool is_guest);
137 141
138 // Called when the screen is locked (after the lock window is visible) or 142 // Called when the screen is locked (after the lock window is visible) or
139 // unlocked. 143 // unlocked.
140 void OnLockStateChange(bool locked); 144 void OnLockStateChange(bool locked);
141 145
142 // Called when Chrome gets a request to display the lock screen. 146 // Called when Chrome gets a request to display the lock screen.
143 void OnStartingLock(); 147 void OnStartingLock();
144 148
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 bool power_button_down_; 192 bool power_button_down_;
189 bool lock_button_down_; 193 bool lock_button_down_;
190 194
191 // Are we in the process of shutting the machine down? 195 // Are we in the process of shutting the machine down?
192 bool shutting_down_; 196 bool shutting_down_;
193 197
194 // Should we start |shutdown_timer_| when we receive notification that the 198 // Should we start |shutdown_timer_| when we receive notification that the
195 // screen has been locked? 199 // screen has been locked?
196 bool should_start_shutdown_timer_after_lock_; 200 bool should_start_shutdown_timer_after_lock_;
197 201
202 // Was a command-line switch set telling us that we're running on hardware
203 // that misreports power button releases?
204 bool has_legacy_power_button_;
205
198 // Responsible for painting |background_layer_|. 206 // Responsible for painting |background_layer_|.
199 scoped_ptr<BackgroundLayerDelegate> background_layer_delegate_; 207 scoped_ptr<BackgroundLayerDelegate> background_layer_delegate_;
200 208
201 // Layer that's stacked under all of the root window's children to provide a 209 // Layer that's stacked under all of the root window's children to provide a
202 // black background when we're scaling all of the other windows down. 210 // black background when we're scaling all of the other windows down.
203 scoped_ptr<ui::Layer> background_layer_; 211 scoped_ptr<ui::Layer> background_layer_;
204 212
205 // Started when the user first presses the power button while in a 213 // Started when the user first presses the power button while in a
206 // logged-in-as-a-non-guest-user, unlocked state. When it fires, we lock the 214 // logged-in-as-a-non-guest-user, unlocked state. When it fires, we lock the
207 // screen. 215 // screen.
(...skipping 21 matching lines...) Expand all
229 // |background_layer_|, as the desktop background is now covering the whole 237 // |background_layer_|, as the desktop background is now covering the whole
230 // screen. 238 // screen.
231 base::OneShotTimer<PowerButtonController> hide_background_layer_timer_; 239 base::OneShotTimer<PowerButtonController> hide_background_layer_timer_;
232 240
233 DISALLOW_COPY_AND_ASSIGN(PowerButtonController); 241 DISALLOW_COPY_AND_ASSIGN(PowerButtonController);
234 }; 242 };
235 243
236 } // namespace ash 244 } // namespace ash
237 245
238 #endif // ASH_WM_POWER_BUTTON_CONTROLLER_H_ 246 #endif // ASH_WM_POWER_BUTTON_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ash/shell.cc ('k') | ash/wm/power_button_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698