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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 * Schedules the default NWake task. | 117 * Schedules the default NWake task. |
118 * @return {!Promise} A promise firing when the task has been scheduled. | 118 * @return {!Promise} A promise firing when the task has been scheduled. |
119 */ | 119 */ |
120 scheduleNwake: function() {}, | 120 scheduleNwake: function() {}, |
121 | 121 |
122 /** | 122 /** |
123 * Cancels NWake task. | 123 * Cancels NWake task. |
124 * @return {!Promise} A promise firing when the task has been cancelled. | 124 * @return {!Promise} A promise firing when the task has been cancelled. |
125 */ | 125 */ |
126 cancelNwake: function() {}, | 126 cancelNwake: function() {}, |
| 127 |
| 128 /** |
| 129 * Sends a request to generate page bundle. |
| 130 * @return {!Promise} A promise firing when the request is sent. |
| 131 */ |
| 132 generatePageBundle: function() {}, |
| 133 |
| 134 /** |
| 135 * Sends a request to get operation. |
| 136 * @return {!Promise} A promise firing when the request is sent. |
| 137 */ |
| 138 getOperation: function() {}, |
127 }; | 139 }; |
128 | 140 |
129 /** | 141 /** |
130 * @constructor | 142 * @constructor |
131 * @implements {offlineInternals.OfflineInternalsBrowserProxy} | 143 * @implements {offlineInternals.OfflineInternalsBrowserProxy} |
132 */ | 144 */ |
133 function OfflineInternalsBrowserProxyImpl() {} | 145 function OfflineInternalsBrowserProxyImpl() {} |
134 cr.addSingletonGetter(OfflineInternalsBrowserProxyImpl); | 146 cr.addSingletonGetter(OfflineInternalsBrowserProxyImpl); |
135 | 147 |
136 OfflineInternalsBrowserProxyImpl.prototype = { | 148 OfflineInternalsBrowserProxyImpl.prototype = { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 | 198 |
187 /** @override */ | 199 /** @override */ |
188 scheduleNwake: function() { | 200 scheduleNwake: function() { |
189 return cr.sendWithPromise('scheduleNwake'); | 201 return cr.sendWithPromise('scheduleNwake'); |
190 }, | 202 }, |
191 | 203 |
192 /** @override */ | 204 /** @override */ |
193 cancelNwake: function() { | 205 cancelNwake: function() { |
194 return cr.sendWithPromise('cancelNwake'); | 206 return cr.sendWithPromise('cancelNwake'); |
195 }, | 207 }, |
| 208 |
| 209 /** @override */ |
| 210 generatePageBundle: function(data) { |
| 211 return cr.sendWithPromise('generatePageBundle', data); |
| 212 }, |
| 213 |
| 214 /** @override */ |
| 215 getOperation: function(data) { |
| 216 return cr.sendWithPromise('getOperation', data); |
| 217 }, |
196 }; | 218 }; |
197 | 219 |
198 return { | 220 return { |
199 OfflineInternalsBrowserProxy: OfflineInternalsBrowserProxy, | 221 OfflineInternalsBrowserProxy: OfflineInternalsBrowserProxy, |
200 OfflineInternalsBrowserProxyImpl: OfflineInternalsBrowserProxyImpl | 222 OfflineInternalsBrowserProxyImpl: OfflineInternalsBrowserProxyImpl |
201 }; | 223 }; |
202 }); | 224 }); |
OLD | NEW |