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

Unified Diff: chrome/browser/chromeos/login/lock/views_screen_locker.h

Issue 2903353003: Adding mojo calls for easy unlock service (Closed)
Patch Set: comments and rebase 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/lock/views_screen_locker.h
diff --git a/chrome/browser/chromeos/login/lock/views_screen_locker.h b/chrome/browser/chromeos/login/lock/views_screen_locker.h
new file mode 100644
index 0000000000000000000000000000000000000000..35dc235dcae1970e60b4f30b499657504577abd2
--- /dev/null
+++ b/chrome/browser/chromeos/login/lock/views_screen_locker.h
@@ -0,0 +1,66 @@
+// Copyright 2017 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_CHROMEOS_LOGIN_LOCK_VIEWS_SCREEN_LOCKER_H_
+#define CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_VIEWS_SCREEN_LOCKER_H_
+
+#include "base/memory/weak_ptr.h"
+#include "chrome/browser/chromeos/login/lock/screen_locker.h"
+#include "chrome/browser/ui/ash/lock_screen_client.h"
+
+namespace chromeos {
+
+class UserSelectionScreen;
+class UserSelectionScreenProxy;
+
+// ViewsScreenLocker acts like LockScreenClient::Delegate which handles method
+// calls coming from ash into chrome.
+// It is also a ScreenLocker::Delegate which handles calls from chrome into
+// ash (views-based lockscreen).
+class ViewsScreenLocker : public LockScreenClient::Delegate,
+ public ScreenLocker::Delegate {
+ public:
+ explicit ViewsScreenLocker(ScreenLocker* screen_locker);
+ ~ViewsScreenLocker() override;
+
+ // ScreenLocker::Delegate:
+ void SetPasswordInputEnabled(bool enabled) override;
+ void ShowErrorMessage(int error_msg_id,
+ HelpAppLauncher::HelpTopic help_topic_id) override;
+ void ClearErrors() override;
+ void AnimateAuthenticationSuccess() override;
+ void OnLockWebUIReady() override;
+ void OnLockBackgroundDisplayed() override;
+ void OnHeaderBarVisible() override;
+ void OnAshLockAnimationFinished() override;
+ void SetFingerprintState(const AccountId& account_id,
+ ScreenLocker::FingerprintState state) override;
+ content::WebContents* GetWebContents() override;
+
+ void Init();
+ void OnLockScreenReady();
+
+ private:
+ // LockScreenClient::Delegate
+ void HandleAttemptUnlock(const AccountId& account_id) override;
+ void HandleHardlockPod(const AccountId& account_id) override;
+ void HandleRecordClickOnLockIcon(const AccountId& account_id) override;
+
+ std::unique_ptr<UserSelectionScreenProxy> user_selection_screen_proxy_;
+ std::unique_ptr<UserSelectionScreen> user_selection_screen_;
+
+ // The ScreenLocker that owns this instance.
+ ScreenLocker* const screen_locker_ = nullptr;
+
+ // Time when lock was initiated, required for metrics.
+ base::TimeTicks lock_time_;
+
+ base::WeakPtrFactory<ViewsScreenLocker> weak_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(ViewsScreenLocker);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_VIEWS_SCREEN_LOCKER_H_
« no previous file with comments | « chrome/browser/chromeos/login/lock/screen_locker.cc ('k') | chrome/browser/chromeos/login/lock/views_screen_locker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698