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

Side by Side Diff: chrome/browser/resources/offline_pages/offline_internals_browser_proxy.js

Issue 2928243002: Return operation name in prefetch request callback and add internal page hookup (Closed)
Patch Set: Rebase Created 3 years, 6 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
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 * @typedef {{ 6 * @typedef {{
7 * onlineUrl: string, 7 * onlineUrl: string,
8 * creationTime: number, 8 * creationTime: number,
9 * id: string, 9 * id: string,
10 * namespace: string, 10 * namespace: string,
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 * Schedules the default NWake task. 124 * Schedules the default NWake task.
125 * @return {!Promise} A promise firing when the task has been scheduled. 125 * @return {!Promise} A promise firing when the task has been scheduled.
126 */ 126 */
127 scheduleNwake: function() {}, 127 scheduleNwake: function() {},
128 128
129 /** 129 /**
130 * Cancels NWake task. 130 * Cancels NWake task.
131 * @return {!Promise} A promise firing when the task has been cancelled. 131 * @return {!Promise} A promise firing when the task has been cancelled.
132 */ 132 */
133 cancelNwake: function() {}, 133 cancelNwake: function() {},
134
135 /**
136 * Sends a request to generate page bundle.
137 * @return {!Promise} A promise firing when the request is sent.
dpapad 2017/06/12 23:29:20 Can you document the returned data structure? Prom
jianli 2017/06/12 23:48:15 Done.
138 */
139 generatePageBundle: function() {},
140
141 /**
142 * Sends a request to get operation.
143 * @return {!Promise} A promise firing when the request is sent.
dpapad 2017/06/12 23:29:20 Same here.
jianli 2017/06/12 23:48:15 Done.
144 */
145 getOperation: function() {},
134 }; 146 };
135 147
136 /** 148 /**
137 * @constructor 149 * @constructor
138 * @implements {offlineInternals.OfflineInternalsBrowserProxy} 150 * @implements {offlineInternals.OfflineInternalsBrowserProxy}
139 */ 151 */
140 function OfflineInternalsBrowserProxyImpl() {} 152 function OfflineInternalsBrowserProxyImpl() {}
141 cr.addSingletonGetter(OfflineInternalsBrowserProxyImpl); 153 cr.addSingletonGetter(OfflineInternalsBrowserProxyImpl);
142 154
143 OfflineInternalsBrowserProxyImpl.prototype = { 155 OfflineInternalsBrowserProxyImpl.prototype = {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 210
199 /** @override */ 211 /** @override */
200 scheduleNwake: function() { 212 scheduleNwake: function() {
201 return cr.sendWithPromise('scheduleNwake'); 213 return cr.sendWithPromise('scheduleNwake');
202 }, 214 },
203 215
204 /** @override */ 216 /** @override */
205 cancelNwake: function() { 217 cancelNwake: function() {
206 return cr.sendWithPromise('cancelNwake'); 218 return cr.sendWithPromise('cancelNwake');
207 }, 219 },
220
221 /** @override */
222 generatePageBundle: function(data) {
223 return cr.sendWithPromise('generatePageBundle', data);
224 },
225
226 /** @override */
227 getOperation: function(data) {
228 return cr.sendWithPromise('getOperation', data);
229 },
208 }; 230 };
209 231
210 return { 232 return {
211 OfflineInternalsBrowserProxy: OfflineInternalsBrowserProxy, 233 OfflineInternalsBrowserProxy: OfflineInternalsBrowserProxy,
212 OfflineInternalsBrowserProxyImpl: OfflineInternalsBrowserProxyImpl 234 OfflineInternalsBrowserProxyImpl: OfflineInternalsBrowserProxyImpl
213 }; 235 };
214 }); 236 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698