OLD | NEW |
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 Loading... |
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 and processes a request to generate page bundle. |
| 137 * @param {string} urls A list of comma-separated URLs. |
| 138 * @return {!Promise<string>} A string describing the result. |
| 139 */ |
| 140 generatePageBundle: function(urls) {}, |
| 141 |
| 142 /** |
| 143 * Sends and processes a request to get operation. |
| 144 * @param {string} name Name of operation. |
| 145 * @return {!Promise<string>} A string describing the result. |
| 146 */ |
| 147 getOperation: function(name) {}, |
134 }; | 148 }; |
135 | 149 |
136 /** | 150 /** |
137 * @constructor | 151 * @constructor |
138 * @implements {offlineInternals.OfflineInternalsBrowserProxy} | 152 * @implements {offlineInternals.OfflineInternalsBrowserProxy} |
139 */ | 153 */ |
140 function OfflineInternalsBrowserProxyImpl() {} | 154 function OfflineInternalsBrowserProxyImpl() {} |
141 cr.addSingletonGetter(OfflineInternalsBrowserProxyImpl); | 155 cr.addSingletonGetter(OfflineInternalsBrowserProxyImpl); |
142 | 156 |
143 OfflineInternalsBrowserProxyImpl.prototype = { | 157 OfflineInternalsBrowserProxyImpl.prototype = { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 | 212 |
199 /** @override */ | 213 /** @override */ |
200 scheduleNwake: function() { | 214 scheduleNwake: function() { |
201 return cr.sendWithPromise('scheduleNwake'); | 215 return cr.sendWithPromise('scheduleNwake'); |
202 }, | 216 }, |
203 | 217 |
204 /** @override */ | 218 /** @override */ |
205 cancelNwake: function() { | 219 cancelNwake: function() { |
206 return cr.sendWithPromise('cancelNwake'); | 220 return cr.sendWithPromise('cancelNwake'); |
207 }, | 221 }, |
| 222 |
| 223 /** @override */ |
| 224 generatePageBundle: function(urls) { |
| 225 return cr.sendWithPromise('generatePageBundle', urls); |
| 226 }, |
| 227 |
| 228 /** @override */ |
| 229 getOperation: function(name) { |
| 230 return cr.sendWithPromise('getOperation', name); |
| 231 }, |
208 }; | 232 }; |
209 | 233 |
210 return { | 234 return { |
211 OfflineInternalsBrowserProxy: OfflineInternalsBrowserProxy, | 235 OfflineInternalsBrowserProxy: OfflineInternalsBrowserProxy, |
212 OfflineInternalsBrowserProxyImpl: OfflineInternalsBrowserProxyImpl | 236 OfflineInternalsBrowserProxyImpl: OfflineInternalsBrowserProxyImpl |
213 }; | 237 }; |
214 }); | 238 }); |
OLD | NEW |