| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 * Promise will return true if url has been successfully added. | 105 * Promise will return true if url has been successfully added. |
| 106 */ | 106 */ |
| 107 addToRequestQueue: function(url) {}, | 107 addToRequestQueue: function(url) {}, |
| 108 | 108 |
| 109 /** | 109 /** |
| 110 * Gets the current network status in string form. | 110 * Gets the current network status in string form. |
| 111 * @return {!Promise<string>} A promise firing when the network status | 111 * @return {!Promise<string>} A promise firing when the network status |
| 112 * is retrieved. | 112 * is retrieved. |
| 113 */ | 113 */ |
| 114 getNetworkStatus: function() {}, | 114 getNetworkStatus: function() {}, |
| 115 |
| 116 /** |
| 117 * Schedules the default NWake task. |
| 118 * @return {!Promise} A promise firing when the task has been scheduled. |
| 119 */ |
| 120 scheduleNwake: function() {}, |
| 121 |
| 122 /** |
| 123 * Cancels NWake task. |
| 124 * @return {!Promise} A promise firing when the task has been cancelled. |
| 125 */ |
| 126 cancelNwake: function() {}, |
| 115 }; | 127 }; |
| 116 | 128 |
| 117 /** | 129 /** |
| 118 * @constructor | 130 * @constructor |
| 119 * @implements {offlineInternals.OfflineInternalsBrowserProxy} | 131 * @implements {offlineInternals.OfflineInternalsBrowserProxy} |
| 120 */ | 132 */ |
| 121 function OfflineInternalsBrowserProxyImpl() {} | 133 function OfflineInternalsBrowserProxyImpl() {} |
| 122 cr.addSingletonGetter(OfflineInternalsBrowserProxyImpl); | 134 cr.addSingletonGetter(OfflineInternalsBrowserProxyImpl); |
| 123 | 135 |
| 124 OfflineInternalsBrowserProxyImpl.prototype = { | 136 OfflineInternalsBrowserProxyImpl.prototype = { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 176 |
| 165 /** @override */ | 177 /** @override */ |
| 166 addToRequestQueue: function(url) { | 178 addToRequestQueue: function(url) { |
| 167 return cr.sendWithPromise('addToRequestQueue', url); | 179 return cr.sendWithPromise('addToRequestQueue', url); |
| 168 }, | 180 }, |
| 169 | 181 |
| 170 /** @override */ | 182 /** @override */ |
| 171 getNetworkStatus: function() { | 183 getNetworkStatus: function() { |
| 172 return cr.sendWithPromise('getNetworkStatus'); | 184 return cr.sendWithPromise('getNetworkStatus'); |
| 173 }, | 185 }, |
| 186 |
| 187 /** @override */ |
| 188 scheduleNwake: function() { |
| 189 return cr.sendWithPromise('scheduleNwake'); |
| 190 }, |
| 191 |
| 192 /** @override */ |
| 193 cancelNwake: function() { |
| 194 return cr.sendWithPromise('cancelNwake'); |
| 195 }, |
| 174 }; | 196 }; |
| 175 | 197 |
| 176 return { | 198 return { |
| 177 OfflineInternalsBrowserProxy: OfflineInternalsBrowserProxy, | 199 OfflineInternalsBrowserProxy: OfflineInternalsBrowserProxy, |
| 178 OfflineInternalsBrowserProxyImpl: OfflineInternalsBrowserProxyImpl | 200 OfflineInternalsBrowserProxyImpl: OfflineInternalsBrowserProxyImpl |
| 179 }; | 201 }; |
| 180 }); | 202 }); |
| OLD | NEW |