| OLD | NEW |
| 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_SHELF_SHELF_LOCKING_MANAGER_H_ | 5 #ifndef ASH_SHELF_SHELF_LOCKING_MANAGER_H_ |
| 6 #define ASH_SHELF_SHELF_LOCKING_MANAGER_H_ | 6 #define ASH_SHELF_SHELF_LOCKING_MANAGER_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/public/cpp/shelf_types.h" | 9 #include "ash/public/cpp/shelf_types.h" |
| 10 #include "ash/session/session_observer.h" | 10 #include "ash/session/session_observer.h" |
| 11 #include "ash/wm/lock_state_observer.h" | 11 #include "ash/wm/lock_state_observer.h" |
| 12 | 12 |
| 13 namespace ash { | 13 namespace ash { |
| 14 | 14 |
| 15 class WmShelf; | 15 class WmShelf; |
| 16 | 16 |
| 17 // ShelfLockingManager observes screen and session events to [un]lock the shelf. | 17 // ShelfLockingManager observes screen and session events to align the shelf at |
| 18 // the bottom of the screen when the screen is locked. |
| 18 class ASH_EXPORT ShelfLockingManager : public SessionObserver, | 19 class ASH_EXPORT ShelfLockingManager : public SessionObserver, |
| 19 public LockStateObserver { | 20 public LockStateObserver { |
| 20 public: | 21 public: |
| 21 explicit ShelfLockingManager(WmShelf* shelf); | 22 explicit ShelfLockingManager(WmShelf* shelf); |
| 22 ~ShelfLockingManager() override; | 23 ~ShelfLockingManager() override; |
| 23 | 24 |
| 24 bool is_locked() const { return session_locked_ || screen_locked_; } | 25 bool is_locked() const { return session_locked_ || screen_locked_; } |
| 25 void set_stored_alignment(ShelfAlignment value) { stored_alignment_ = value; } | 26 void set_stored_alignment(ShelfAlignment value) { stored_alignment_ = value; } |
| 26 | 27 |
| 27 // SessionObserver: | 28 // SessionObserver: |
| (...skipping 13 matching lines...) Expand all Loading... |
| 41 ShelfAlignment stored_alignment_; | 42 ShelfAlignment stored_alignment_; |
| 42 | 43 |
| 43 ScopedSessionObserver scoped_session_observer_; | 44 ScopedSessionObserver scoped_session_observer_; |
| 44 | 45 |
| 45 DISALLOW_COPY_AND_ASSIGN(ShelfLockingManager); | 46 DISALLOW_COPY_AND_ASSIGN(ShelfLockingManager); |
| 46 }; | 47 }; |
| 47 | 48 |
| 48 } // namespace ash | 49 } // namespace ash |
| 49 | 50 |
| 50 #endif // ASH_SHELF_SHELF_LOCKING_MANAGER_H_ | 51 #endif // ASH_SHELF_SHELF_LOCKING_MANAGER_H_ |
| OLD | NEW |