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

Side by Side Diff: ash/test/lock_state_controller_test_api.h

Issue 2497123002: chromeos: Move device shutdown handling out of chrome into ash (Closed)
Patch Set: rebase 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/test/BUILD.gn ('k') | ash/test/lock_state_controller_test_api.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_TEST_LOCK_STATE_CONTROLLER_TEST_API_H_ 5 #ifndef ASH_TEST_LOCK_STATE_CONTROLLER_TEST_API_H_
6 #define ASH_TEST_LOCK_STATE_CONTROLLER_TEST_API_H_ 6 #define ASH_TEST_LOCK_STATE_CONTROLLER_TEST_API_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "ash/wm/lock_state_controller.h" 10 #include "ash/wm/lock_state_controller.h"
11 #include "base/timer/elapsed_timer.h" 11 #include "base/timer/elapsed_timer.h"
12 #include "base/timer/timer.h" 12 #include "base/timer/timer.h"
13 13
14 namespace ash { 14 namespace ash {
15 15
16 namespace mojom { 16 namespace mojom {
17 class ShutdownClient; 17 class ShutdownClient;
18 } 18 }
19 19
20 namespace test { 20 namespace test {
21 21
22 // Helper class used by tests to access internal state. 22 // Helper class used by tests to access internal state.
23 class LockStateControllerTestApi { 23 class LockStateControllerTestApi {
24 public: 24 public:
25 explicit LockStateControllerTestApi(LockStateController* controller); 25 explicit LockStateControllerTestApi(LockStateController* controller);
26 ~LockStateControllerTestApi(); 26 ~LockStateControllerTestApi();
27 27
28 void SetShutdownClient(std::unique_ptr<mojom::ShutdownClient> client); 28 void set_shutdown_controller(ShutdownController* shutdown_controller) {
29 controller_->shutdown_controller_ = shutdown_controller;
30 }
29 31
30 bool lock_fail_timer_is_running() const { 32 bool lock_fail_timer_is_running() const {
31 return controller_->lock_fail_timer_.IsRunning(); 33 return controller_->lock_fail_timer_.IsRunning();
32 } 34 }
33 bool lock_to_shutdown_timer_is_running() const { 35 bool lock_to_shutdown_timer_is_running() const {
34 return controller_->lock_to_shutdown_timer_.IsRunning(); 36 return controller_->lock_to_shutdown_timer_.IsRunning();
35 } 37 }
36 bool shutdown_timer_is_running() const { 38 bool shutdown_timer_is_running() const {
37 return controller_->pre_shutdown_timer_.IsRunning(); 39 return controller_->pre_shutdown_timer_.IsRunning();
38 } 40 }
(...skipping 25 matching lines...) Expand all
64 private: 66 private:
65 LockStateController* controller_; // not owned 67 LockStateController* controller_; // not owned
66 68
67 DISALLOW_COPY_AND_ASSIGN(LockStateControllerTestApi); 69 DISALLOW_COPY_AND_ASSIGN(LockStateControllerTestApi);
68 }; 70 };
69 71
70 } // namespace test 72 } // namespace test
71 } // namespace ash 73 } // namespace ash
72 74
73 #endif // ASH_TEST_LOCK_STATE_CONTROLLER_TEST_API_H_ 75 #endif // ASH_TEST_LOCK_STATE_CONTROLLER_TEST_API_H_
OLDNEW
« no previous file with comments | « ash/test/BUILD.gn ('k') | ash/test/lock_state_controller_test_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698