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

Side by Side Diff: chrome/browser/resources/settings/default_browser_page/default_browser_browser_proxy.js

Issue 2317693003: [MD settings] display message about secondary install in default browser settings (Closed)
Patch Set: excluding from chromeos Created 4 years, 3 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 "Default Browser" section
7 * to interact with the browser.
8 */
9
10 /**
11 * @typedef {{
12 * canBeDefault: boolean,
13 * isDefault: boolean,
14 * isDisabledByPolicy: boolean,
15 * isUnknownError: boolean,
16 * }};
17 */
18 var DefaultBrowserInfo;
19
20 cr.define('settings', function() {
21 /** @interface */
22 function DefaultBrowserBrowserProxy() {}
23
24 DefaultBrowserBrowserProxy.prototype = {
25 /**
26 * Get the initial DefaultBrowserInfo and begin sending updates to
27 * 'settings.updateDefaultBrowserState'.
28 * @return {!Promise<DefaultBrowserInfo>}
29 */
30 requestDefaultBrowserState: function() {},
31
32 /*
33 * Try to set the current browser as the default browser. The new status of
34 * the settings will be sent to 'settings.updateDefaultBrowserState'.
35 */
36 setAsDefaultBrowser: function() {},
37 };
38
39 /**
40 * @constructor
41 * @implements {settings.DefaultBrowserBrowserProxy}
42 */
43 function DefaultBrowserBrowserProxyImpl() {}
44 cr.addSingletonGetter(DefaultBrowserBrowserProxyImpl);
45
46 DefaultBrowserBrowserProxyImpl.prototype = {
47 /** @override */
48 requestDefaultBrowserState: function() {
49 return cr.sendWithPromise(
50 'SettingsDefaultBrowser.requestDefaultBrowserState');
51 },
52
53 /** @override */
54 setAsDefaultBrowser: function() {
55 chrome.send('SettingsDefaultBrowser.setAsDefaultBrowser');
56 },
57 };
58
59 return {
60 DefaultBrowserBrowserProxy: DefaultBrowserBrowserProxy,
61 DefaultBrowserBrowserProxyImpl: DefaultBrowserBrowserProxyImpl,
62 };
63 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698