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

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

Issue 2896093003: cros: Make sure views-based lock screen is destroyed after it is dismissed. (Closed)
Patch Set: Address comments Created 3 years, 6 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_LOCK_SCREEN_CLIENT_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_LOCK_SCREEN_CLIENT_H_
6 #define CHROME_BROWSER_UI_ASH_LOCK_SCREEN_CLIENT_H_ 6 #define CHROME_BROWSER_UI_ASH_LOCK_SCREEN_CLIENT_H_
7 7
8 #include "ash/public/interfaces/lock_screen.mojom.h" 8 #include "ash/public/interfaces/lock_screen.mojom.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "mojo/public/cpp/bindings/binding.h" 10 #include "mojo/public/cpp/bindings/binding.h"
11 11
12 // Handles method calls delegated back to chrome from ash. Also notifies ash of 12 // Handles method calls sent from ash to chrome. Also sends messages from chrome
13 // relevant state changes in chrome. 13 // to ash.
14 class LockScreenClient : public ash::mojom::LockScreenClient { 14 class LockScreenClient : public ash::mojom::LockScreenClient {
15 public: 15 public:
16 LockScreenClient(); 16 LockScreenClient();
17 ~LockScreenClient() override; 17 ~LockScreenClient() override;
18 18
19 static LockScreenClient* Get(); 19 static LockScreenClient* Get();
20 20
21 // ash::mojom::LockScreenClient: 21 // ash::mojom::LockScreenClient:
22 void AuthenticateUser(const AccountId& account_id, 22 void AuthenticateUser(const AccountId& account_id,
23 const std::string& hashed_password, 23 const std::string& hashed_password,
24 bool authenticated_by_pin) override; 24 bool authenticated_by_pin,
25 AuthenticateUserCallback callback) override;
25 26
26 // Wrappers around the mojom::SystemTray interface. 27 // Wrappers around the mojom::SystemTray interface.
28 void ShowLockScreen(ash::mojom::LockScreen::ShowLockScreenCallback on_shown);
27 void ShowErrorMessage(int32_t login_attempts, 29 void ShowErrorMessage(int32_t login_attempts,
28 const std::string& error_text, 30 const std::string& error_text,
29 const std::string& help_link_text, 31 const std::string& help_link_text,
30 int32_t help_topic_id); 32 int32_t help_topic_id);
31 void ClearErrors(); 33 void ClearErrors();
32 34
33 private: 35 private:
34 // Lock screen mojo service in ash. 36 // Lock screen mojo service in ash.
35 ash::mojom::LockScreenPtr lock_screen_; 37 ash::mojom::LockScreenPtr lock_screen_;
36 38
37 // Binds this object to the client interface. 39 // Binds this object to the client interface.
38 mojo::Binding<ash::mojom::LockScreenClient> binding_; 40 mojo::Binding<ash::mojom::LockScreenClient> binding_;
39 41
40 DISALLOW_COPY_AND_ASSIGN(LockScreenClient); 42 DISALLOW_COPY_AND_ASSIGN(LockScreenClient);
41 }; 43 };
42 44
43 #endif // CHROME_BROWSER_UI_ASH_LOCK_SCREEN_CLIENT_H_ 45 #endif // CHROME_BROWSER_UI_ASH_LOCK_SCREEN_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698