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

Unified Diff: chrome/browser/resources/settings/people_page/easy_unlock_browser_proxy.js

Issue 1806123002: Settings People Revamp: Easy Unlock: Add browser proxy and setup flow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/resources/settings/people_page/easy_unlock_browser_proxy.js
diff --git a/chrome/browser/resources/settings/people_page/easy_unlock_browser_proxy.js b/chrome/browser/resources/settings/people_page/easy_unlock_browser_proxy.js
new file mode 100644
index 0000000000000000000000000000000000000000..d46ec7ec1b4baea4910dc664c4a9e2b1cfb11684
--- /dev/null
+++ b/chrome/browser/resources/settings/people_page/easy_unlock_browser_proxy.js
@@ -0,0 +1,52 @@
+// 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.
+
+/**
+ * @fileoverview A helper object used from the the People section to interact
+ * with the Easy Unlock functionality of the browser. ChromeOS only.
+ */
+cr.exportPath('settings');
+
+cr.define('settings', function() {
+ /** @interface */
+ function EasyUnlockBrowserProxy() {}
+
+ EasyUnlockBrowserProxy.prototype = {
+ /**
+ * Returns a true promise if Easy Unlock is already enabled on the device.
+ * @return {!Promise<boolean>}
+ */
+ getEnabledStatus: function() {},
+
+ /**
+ * Starts the Easy Unlock setup flow.
+ */
+ launchSetup: function() {}
+ };
+
+ /**
+ * @constructor
+ * @implements {EasyUnlockBrowserProxy}
+ */
+ function EasyUnlockBrowserProxyImpl() {}
+ // The singleton instance_ is replaced with a test version of this wrapper
+ // during testing.
+ cr.addSingletonGetter(EasyUnlockBrowserProxyImpl);
+
+ EasyUnlockBrowserProxyImpl.prototype = {
+ /** @override */
+ getEnabledStatus: function() {
+ return cr.sendWithPromise('easyUnlockGetEnabledStatus');
+ },
+
+ /** @override */
+ launchSetup: function() {
+ chrome.send('easyUnlockLaunchSetup');
+ },
+ };
+
+ return {
+ EasyUnlockBrowserProxyImpl: EasyUnlockBrowserProxyImpl,
+ };
+});

Powered by Google App Engine
This is Rietveld 408576698