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

Side by Side Diff: chrome/browser/ui/ash/session_controller_client.h

Issue 2830933002: cros: Use SessionController for lock starting code (Closed)
Patch Set: fix nit Created 3 years, 8 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
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 CHROME_BROWSER_UI_ASH_SESSION_CONTROLLER_CLIENT_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_SESSION_CONTROLLER_CLIENT_H_
6 #define CHROME_BROWSER_UI_ASH_SESSION_CONTROLLER_CLIENT_H_ 6 #define CHROME_BROWSER_UI_ASH_SESSION_CONTROLLER_CLIENT_H_
7 7
8 #include "ash/public/interfaces/session_controller.mojom.h" 8 #include "ash/public/interfaces/session_controller.mojom.h"
9 #include "base/callback_forward.h" 9 #include "base/callback_forward.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 19 matching lines...) Expand all
30 public user_manager::UserManager::UserSessionStateObserver, 30 public user_manager::UserManager::UserSessionStateObserver,
31 public user_manager::UserManager::Observer, 31 public user_manager::UserManager::Observer,
32 public session_manager::SessionManagerObserver, 32 public session_manager::SessionManagerObserver,
33 public content::NotificationObserver { 33 public content::NotificationObserver {
34 public: 34 public:
35 SessionControllerClient(); 35 SessionControllerClient();
36 ~SessionControllerClient() override; 36 ~SessionControllerClient() override;
37 37
38 static SessionControllerClient* Get(); 38 static SessionControllerClient* Get();
39 39
40 // Calls SessionController to start locking ash. |callback| will be invoked
41 // to indicate whether the lock is successful. If |locked| is true, the post
42 // lock animation is finished and ash is fully locked. Otherwise, the lock
43 // is failed somehow.
44 using StartLockCallback = base::Callback<void(bool locked)>;
45 void StartLock(StartLockCallback callback);
46
40 // Calls ash SessionController to run unlock animation. 47 // Calls ash SessionController to run unlock animation.
41 // |animation_finished_callback| will be invoked when the animation finishes. 48 // |animation_finished_callback| will be invoked when the animation finishes.
42 void RunUnlockAnimation(base::Closure animation_finished_callback); 49 void RunUnlockAnimation(base::Closure animation_finished_callback);
43 50
44 // ash::mojom::SessionControllerClient: 51 // ash::mojom::SessionControllerClient:
45 void RequestLockScreen() override; 52 void RequestLockScreen() override;
46 void SwitchActiveUser(const AccountId& account_id) override; 53 void SwitchActiveUser(const AccountId& account_id) override;
47 void CycleActiveUser(ash::CycleUserDirection direction) override; 54 void CycleActiveUser(ash::CycleUserDirection direction) override;
48 55
49 // user_manager::UserManager::UserSessionStateObserver: 56 // user_manager::UserManager::UserSessionStateObserver:
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 105
99 // For observing NOTIFICATION_APP_TERMINATING. 106 // For observing NOTIFICATION_APP_TERMINATING.
100 content::NotificationRegistrar registrar_; 107 content::NotificationRegistrar registrar_;
101 108
102 ash::mojom::SessionInfoPtr last_sent_session_info_; 109 ash::mojom::SessionInfoPtr last_sent_session_info_;
103 110
104 DISALLOW_COPY_AND_ASSIGN(SessionControllerClient); 111 DISALLOW_COPY_AND_ASSIGN(SessionControllerClient);
105 }; 112 };
106 113
107 #endif // CHROME_BROWSER_UI_ASH_SESSION_CONTROLLER_CLIENT_H_ 114 #endif // CHROME_BROWSER_UI_ASH_SESSION_CONTROLLER_CLIENT_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/lock/webui_screen_locker.cc ('k') | chrome/browser/ui/ash/session_controller_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698