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

Unified Diff: chrome/browser/ui/ash/lock_screen_client_chromeos.h

Issue 2876673002: mojo api for view based lockscreen (Closed)
Patch Set: comment Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/ash/lock_screen_client_chromeos.h
diff --git a/chrome/browser/ui/ash/lock_screen_client_chromeos.h b/chrome/browser/ui/ash/lock_screen_client_chromeos.h
new file mode 100644
index 0000000000000000000000000000000000000000..32341e6b42fdecbdd60391dfb0688736a1004fae
--- /dev/null
+++ b/chrome/browser/ui/ash/lock_screen_client_chromeos.h
@@ -0,0 +1,39 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_ASH_LOCK_SCREEN_CLIENT_CHROMEOS_H_
+#define CHROME_BROWSER_UI_ASH_LOCK_SCREEN_CLIENT_CHROMEOS_H_
+
+#include "ash/public/interfaces/lock_screen.mojom.h"
+#include "base/macros.h"
+#include "mojo/public/cpp/bindings/binding.h"
+
+// Handles method calls delegated back to chrome from ash. Also notifies ash of
+// relevant state changes in chrome.
+class LockScreenClientChromeOS : public ash::mojom::LockScreenClient {
James Cook 2017/05/15 21:15:01 This class/file don't need to have "chromeos" in t
xiaoyinh(OOO Sep 11-29) 2017/05/16 17:32:50 Done. Thanks for the information!
+ public:
+ LockScreenClientChromeOS();
+ ~LockScreenClientChromeOS() override;
+
+ static LockScreenClientChromeOS* Get();
+
+ // ash::mojom::LockScreenClient:
+ void AuthenticateUser(const AccountId& account_id,
+ const std::string& hashed_password,
+ bool authenticated_by_pin) override;
+
+ void ShowErrorMessage();
+ void ClearErrors();
+
+ private:
+ // Lock screen mojo service in ash.
+ ash::mojom::LockScreenPtr lock_screen_;
+
+ // Binds this object to the client interface.
+ mojo::Binding<ash::mojom::LockScreenClient> binding_;
+
+ DISALLOW_COPY_AND_ASSIGN(LockScreenClientChromeOS);
+};
+
+#endif // CHROME_BROWSER_UI_ASH_LOCK_SCREEN_CLIENT_CHROMEOS_H_

Powered by Google App Engine
This is Rietveld 408576698