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 #include "ash/mus/bridge/wm_shell_mus.h" | 5 #include "ash/mus/bridge/wm_shell_mus.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "ash/common/accelerators/accelerator_controller.h" | 9 #include "ash/common/accelerators/accelerator_controller.h" |
10 #include "ash/common/key_event_watcher.h" | 10 #include "ash/common/key_event_watcher.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // of SessionStateDelegate. | 50 // of SessionStateDelegate. |
51 class SessionStateDelegateStub : public SessionStateDelegate { | 51 class SessionStateDelegateStub : public SessionStateDelegate { |
52 public: | 52 public: |
53 SessionStateDelegateStub() | 53 SessionStateDelegateStub() |
54 : screen_locked_(false), user_info_(new user_manager::UserInfoImpl()) {} | 54 : screen_locked_(false), user_info_(new user_manager::UserInfoImpl()) {} |
55 | 55 |
56 ~SessionStateDelegateStub() override {} | 56 ~SessionStateDelegateStub() override {} |
57 | 57 |
58 // SessionStateDelegate: | 58 // SessionStateDelegate: |
59 int GetMaximumNumberOfLoggedInUsers() const override { return 3; } | 59 int GetMaximumNumberOfLoggedInUsers() const override { return 3; } |
60 int NumberOfLoggedInUsers() const override { | 60 int NumberOfLoggedInUsers() const override { return 1; } |
61 // ash_shell has 2 users. | |
62 return 2; | |
63 } | |
64 bool IsActiveUserSessionStarted() const override { return true; } | 61 bool IsActiveUserSessionStarted() const override { return true; } |
65 bool CanLockScreen() const override { return true; } | 62 bool CanLockScreen() const override { return true; } |
66 bool IsScreenLocked() const override { return screen_locked_; } | 63 bool IsScreenLocked() const override { return screen_locked_; } |
67 bool ShouldLockScreenAutomatically() const override { return false; } | 64 bool ShouldLockScreenAutomatically() const override { return false; } |
68 void LockScreen() override { | 65 void LockScreen() override { |
69 screen_locked_ = true; | 66 screen_locked_ = true; |
70 NOTIMPLEMENTED(); | 67 NOTIMPLEMENTED(); |
71 } | 68 } |
72 void UnlockScreen() override { | 69 void UnlockScreen() override { |
73 NOTIMPLEMENTED(); | 70 NOTIMPLEMENTED(); |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 WmWindow* gained_active_wm = WmWindowMus::Get(gained_active); | 440 WmWindow* gained_active_wm = WmWindowMus::Get(gained_active); |
444 if (gained_active_wm) | 441 if (gained_active_wm) |
445 set_root_window_for_new_windows(gained_active_wm->GetRootWindow()); | 442 set_root_window_for_new_windows(gained_active_wm->GetRootWindow()); |
446 WmWindow* lost_active_wm = WmWindowMus::Get(lost_active); | 443 WmWindow* lost_active_wm = WmWindowMus::Get(lost_active); |
447 for (auto& observer : activation_observers_) | 444 for (auto& observer : activation_observers_) |
448 observer.OnWindowActivated(gained_active_wm, lost_active_wm); | 445 observer.OnWindowActivated(gained_active_wm, lost_active_wm); |
449 } | 446 } |
450 | 447 |
451 } // namespace mus | 448 } // namespace mus |
452 } // namespace ash | 449 } // namespace ash |
OLD | NEW |