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

Side by Side 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 unified diff | Download patch
OLDNEW
(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 /**
6 * @fileoverview A helper object used from the the People section to interact
7 * with the Easy Unlock functionality of the browser. ChromeOS only.
8 */
9 cr.exportPath('settings');
10
11 cr.define('settings', function() {
12 /** @interface */
13 function EasyUnlockBrowserProxy() {}
14
15 EasyUnlockBrowserProxy.prototype = {
16 /**
17 * Returns a true promise if Easy Unlock is already enabled on the device.
18 * @return {!Promise<boolean>}
19 */
20 getEnabledStatus: function() {},
21
22 /**
23 * Starts the Easy Unlock setup flow.
24 */
25 launchSetup: function() {}
26 };
27
28 /**
29 * @constructor
30 * @implements {EasyUnlockBrowserProxy}
31 */
32 function EasyUnlockBrowserProxyImpl() {}
33 // The singleton instance_ is replaced with a test version of this wrapper
34 // during testing.
35 cr.addSingletonGetter(EasyUnlockBrowserProxyImpl);
36
37 EasyUnlockBrowserProxyImpl.prototype = {
38 /** @override */
39 getEnabledStatus: function() {
40 return cr.sendWithPromise('easyUnlockGetEnabledStatus');
41 },
42
43 /** @override */
44 launchSetup: function() {
45 chrome.send('easyUnlockLaunchSetup');
46 },
47 };
48
49 return {
50 EasyUnlockBrowserProxyImpl: EasyUnlockBrowserProxyImpl,
51 };
52 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698