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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/default_browser_page/default_browser_browser_proxy.js
diff --git a/chrome/browser/resources/settings/default_browser_page/default_browser_browser_proxy.js b/chrome/browser/resources/settings/default_browser_page/default_browser_browser_proxy.js
new file mode 100644
index 0000000000000000000000000000000000000000..a6f4725b21ad85d5f1dffe7d7332cc4f3469b112
--- /dev/null
+++ b/chrome/browser/resources/settings/default_browser_page/default_browser_browser_proxy.js
@@ -0,0 +1,63 @@
+// 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 "Default Browser" section
+ * to interact with the browser.
+ */
+
+/**
+ * @typedef {{
+ * canBeDefault: boolean,
+ * isDefault: boolean,
+ * isDisabledByPolicy: boolean,
+ * isUnknownError: boolean,
+ * }};
Finnur 2016/09/07 16:25:22 nit: Should this be indented?
dschuyler 2016/09/07 18:51:42 Done.
+ */
+var DefaultBrowserInfo;
+
+cr.define('settings', function() {
+ /** @interface */
+ function DefaultBrowserBrowserProxy() {}
+
+ DefaultBrowserBrowserProxy.prototype = {
+ /**
+ * Get the initial DefaultBrowserInfo and begin sending updates to
+ * 'settings.updateDefaultBrowserState'.
Finnur 2016/09/07 16:25:22 nit: Same question here... I don't remember us ind
dschuyler 2016/09/07 18:51:42 Done.
+ * @return {!Promise<DefaultBrowserInfo>}
+ */
+ requestDefaultBrowserState: function() {},
+
+ /*
+ * Try to set the current browser as the default browser. The new status of
+ * the settings will be sent to 'settings.updateDefaultBrowserState'.
Finnur 2016/09/07 16:25:22 ditto
dschuyler 2016/09/07 18:51:42 Done.
+ */
+ setAsDefaultBrowser: function() {},
+ };
+
+ /**
+ * @constructor
+ * @implements {settings.DefaultBrowserBrowserProxy}
+ */
+ function DefaultBrowserBrowserProxyImpl() {}
+ cr.addSingletonGetter(DefaultBrowserBrowserProxyImpl);
+
+ DefaultBrowserBrowserProxyImpl.prototype = {
+ /** @override */
+ requestDefaultBrowserState: function() {
+ return cr.sendWithPromise(
+ 'SettingsDefaultBrowser.requestDefaultBrowserState');
+ },
+
+ /** @override */
+ setAsDefaultBrowser: function() {
+ chrome.send('SettingsDefaultBrowser.setAsDefaultBrowser');
+ },
+ };
+
+ return {
+ DefaultBrowserBrowserProxy: DefaultBrowserBrowserProxy,
+ DefaultBrowserBrowserProxyImpl: DefaultBrowserBrowserProxyImpl,
+ };
+});

Powered by Google App Engine
This is Rietveld 408576698