OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_ASH_LOCK_SCREEN_CLIENT_H_ |
| 6 #define CHROME_BROWSER_UI_ASH_LOCK_SCREEN_CLIENT_H_ |
| 7 |
| 8 #include "ash/public/interfaces/lock_screen.mojom.h" |
| 9 #include "base/macros.h" |
| 10 #include "mojo/public/cpp/bindings/binding.h" |
| 11 |
| 12 // Handles method calls delegated back to chrome from ash. Also notifies ash of |
| 13 // relevant state changes in chrome. |
| 14 class LockScreenClient : public ash::mojom::LockScreenClient { |
| 15 public: |
| 16 LockScreenClient(); |
| 17 ~LockScreenClient() override; |
| 18 |
| 19 static LockScreenClient* Get(); |
| 20 |
| 21 // ash::mojom::LockScreenClient: |
| 22 void AuthenticateUser(const AccountId& account_id, |
| 23 const std::string& hashed_password, |
| 24 bool authenticated_by_pin) override; |
| 25 |
| 26 // Wrappers around the mojom::SystemTray interface. |
| 27 void ShowErrorMessage(int32_t login_attempts, |
| 28 const std::string& error_text, |
| 29 const std::string& help_link_text, |
| 30 int32_t help_topic_id); |
| 31 void ClearErrors(); |
| 32 |
| 33 private: |
| 34 // Lock screen mojo service in ash. |
| 35 ash::mojom::LockScreenPtr lock_screen_; |
| 36 |
| 37 // Binds this object to the client interface. |
| 38 mojo::Binding<ash::mojom::LockScreenClient> binding_; |
| 39 |
| 40 DISALLOW_COPY_AND_ASSIGN(LockScreenClient); |
| 41 }; |
| 42 |
| 43 #endif // CHROME_BROWSER_UI_ASH_LOCK_SCREEN_CLIENT_H_ |
OLD | NEW |