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

Side by Side Diff: chrome/browser/resources/settings/about_page/about_page_browser_proxy.js

Issue 2583743002: Add mac-only "Set Up Automatic Updates..." button to the new about page. (Closed)
Patch Set: add back nullptr check Created 4 years 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview A helper object used from the "About" section to interact with 6 * @fileoverview A helper object used from the "About" section to interact with
7 * the browser. 7 * the browser.
8 */ 8 */
9 9
10 <if expr="chromeos"> 10 <if expr="chromeos">
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 var UpdateStatus = { 53 var UpdateStatus = {
54 CHECKING: 'checking', 54 CHECKING: 'checking',
55 UPDATING: 'updating', 55 UPDATING: 'updating',
56 NEARLY_UPDATED: 'nearly_updated', 56 NEARLY_UPDATED: 'nearly_updated',
57 UPDATED: 'updated', 57 UPDATED: 'updated',
58 FAILED: 'failed', 58 FAILED: 'failed',
59 DISABLED: 'disabled', 59 DISABLED: 'disabled',
60 DISABLED_BY_ADMIN: 'disabled_by_admin', 60 DISABLED_BY_ADMIN: 'disabled_by_admin',
61 }; 61 };
62 62
63 <if expr="_google_chrome and is_macosx">
64 /**
65 * @typedef {{
66 * hidden: boolean,
67 * disabled: boolean,
68 * actionable: boolean,
69 * text: (string|undefined)
70 * }}
71 */
72 var PromoteUpdaterStatus;
73 </if>
74
63 /** 75 /**
64 * @typedef {{ 76 * @typedef {{
65 * status: !UpdateStatus, 77 * status: !UpdateStatus,
66 * progress: (number|undefined), 78 * progress: (number|undefined),
67 * message: (string|undefined), 79 * message: (string|undefined),
68 * }} 80 * }}
69 */ 81 */
70 var UpdateStatusChangedEvent; 82 var UpdateStatusChangedEvent;
71 83
72 cr.define('settings', function() { 84 cr.define('settings', function() {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 153
142 /** @return {!Promise<!ChannelInfo>} */ 154 /** @return {!Promise<!ChannelInfo>} */
143 getChannelInfo: function() {}, 155 getChannelInfo: function() {},
144 156
145 /** @return {!Promise<!VersionInfo>} */ 157 /** @return {!Promise<!VersionInfo>} */
146 getVersionInfo: function() {}, 158 getVersionInfo: function() {},
147 159
148 /** @return {!Promise<?RegulatoryInfo>} */ 160 /** @return {!Promise<?RegulatoryInfo>} */
149 getRegulatoryInfo: function() {}, 161 getRegulatoryInfo: function() {},
150 </if> 162 </if>
163
164 <if expr="_google_chrome and is_macosx">
165 /**
166 * Triggers setting up auto-updates for all users.
167 */
168 promoteUpdater: function() {},
169 </if>
151 }; 170 };
152 171
153 /** 172 /**
154 * @implements {settings.AboutPageBrowserProxy} 173 * @implements {settings.AboutPageBrowserProxy}
155 * @constructor 174 * @constructor
156 */ 175 */
157 function AboutPageBrowserProxyImpl() {} 176 function AboutPageBrowserProxyImpl() {}
158 cr.addSingletonGetter(AboutPageBrowserProxyImpl); 177 cr.addSingletonGetter(AboutPageBrowserProxyImpl);
159 178
160 AboutPageBrowserProxyImpl.prototype = { 179 AboutPageBrowserProxyImpl.prototype = {
161 /** @override */ 180 /** @override */
162 pageReady: function() { 181 pageReady: function() {
163 chrome.send('aboutPageReady'); 182 chrome.send('aboutPageReady');
164 }, 183 },
165 184
166 /** @override */ 185 /** @override */
167 refreshUpdateStatus: function() { 186 refreshUpdateStatus: function() {
168 chrome.send('refreshUpdateStatus'); 187 chrome.send('refreshUpdateStatus');
169 }, 188 },
170 189
190 <if expr="_google_chrome and is_macosx">
191 /** @override */
192 promoteUpdater: function() {
193 chrome.send('promoteUpdater');
194 },
195 </if>
196
171 /** @override */ 197 /** @override */
172 openHelpPage: function() { 198 openHelpPage: function() {
173 chrome.send('openHelpPage'); 199 chrome.send('openHelpPage');
174 }, 200 },
175 201
176 <if expr="_google_chrome"> 202 <if expr="_google_chrome">
177 /** @override */ 203 /** @override */
178 openFeedbackDialog: function() { 204 openFeedbackDialog: function() {
179 chrome.send('openFeedbackDialog'); 205 chrome.send('openFeedbackDialog');
180 }, 206 },
(...skipping 27 matching lines...) Expand all
208 </if> 234 </if>
209 }; 235 };
210 236
211 return { 237 return {
212 AboutPageBrowserProxy: AboutPageBrowserProxy, 238 AboutPageBrowserProxy: AboutPageBrowserProxy,
213 AboutPageBrowserProxyImpl: AboutPageBrowserProxyImpl, 239 AboutPageBrowserProxyImpl: AboutPageBrowserProxyImpl,
214 browserChannelToI18nId: browserChannelToI18nId, 240 browserChannelToI18nId: browserChannelToI18nId,
215 isTargetChannelMoreStable: isTargetChannelMoreStable, 241 isTargetChannelMoreStable: isTargetChannelMoreStable,
216 }; 242 };
217 }); 243 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/about_page/about_page.js ('k') | chrome/browser/ui/webui/help/help_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698