| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 * logs are retrieved. | 88 * logs are retrieved. |
| 89 */ | 89 */ |
| 90 getEventLogs: function() {}, | 90 getEventLogs: function() {}, |
| 91 | 91 |
| 92 /** | 92 /** |
| 93 * Gets the state of logging (on/off). | 93 * Gets the state of logging (on/off). |
| 94 * @return {!Promise<!IsLogging>} A promise firing when the state | 94 * @return {!Promise<!IsLogging>} A promise firing when the state |
| 95 * is retrieved. | 95 * is retrieved. |
| 96 */ | 96 */ |
| 97 getLoggingState: function() {}, | 97 getLoggingState: function() {}, |
| 98 |
| 99 /** |
| 100 * Adds the given url to the background loader queue. |
| 101 * @param {string} url Url of the page to load later. |
| 102 * @return {!Promise<boolean>} A promise firing after added to queue. |
| 103 * Promise will return true if url has been successfully added. |
| 104 */ |
| 105 addToRequestQueue: function(url) {}, |
| 106 |
| 107 /** |
| 108 * Gets the current network status in string form. |
| 109 * @return {!Promise<string>} A promise firing when the network status |
| 110 * is retrieved. |
| 111 */ |
| 112 getNetworkStatus: function() {}, |
| 98 }; | 113 }; |
| 99 | 114 |
| 100 /** | 115 /** |
| 101 * @constructor | 116 * @constructor |
| 102 * @implements {offlineInternals.OfflineInternalsBrowserProxy} | 117 * @implements {offlineInternals.OfflineInternalsBrowserProxy} |
| 103 */ | 118 */ |
| 104 function OfflineInternalsBrowserProxyImpl() {} | 119 function OfflineInternalsBrowserProxyImpl() {} |
| 105 cr.addSingletonGetter(OfflineInternalsBrowserProxyImpl); | 120 cr.addSingletonGetter(OfflineInternalsBrowserProxyImpl); |
| 106 | 121 |
| 107 OfflineInternalsBrowserProxyImpl.prototype = { | 122 OfflineInternalsBrowserProxyImpl.prototype = { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 136 }, | 151 }, |
| 137 | 152 |
| 138 /** @override */ | 153 /** @override */ |
| 139 getEventLogs: function() { | 154 getEventLogs: function() { |
| 140 return cr.sendWithPromise('getEventLogs'); | 155 return cr.sendWithPromise('getEventLogs'); |
| 141 }, | 156 }, |
| 142 | 157 |
| 143 /** @override */ | 158 /** @override */ |
| 144 getLoggingState: function() { | 159 getLoggingState: function() { |
| 145 return cr.sendWithPromise('getLoggingState'); | 160 return cr.sendWithPromise('getLoggingState'); |
| 146 } | 161 }, |
| 162 |
| 163 /** @override */ |
| 164 addToRequestQueue: function(url) { |
| 165 return cr.sendWithPromise('addToRequestQueue', url); |
| 166 }, |
| 167 |
| 168 /** @override */ |
| 169 getNetworkStatus: function() { |
| 170 return cr.sendWithPromise('getNetworkStatus'); |
| 171 }, |
| 147 }; | 172 }; |
| 148 | 173 |
| 149 return { | 174 return { |
| 150 OfflineInternalsBrowserProxy: OfflineInternalsBrowserProxy, | 175 OfflineInternalsBrowserProxy: OfflineInternalsBrowserProxy, |
| 151 OfflineInternalsBrowserProxyImpl: OfflineInternalsBrowserProxyImpl | 176 OfflineInternalsBrowserProxyImpl: OfflineInternalsBrowserProxyImpl |
| 152 }; | 177 }; |
| 153 }); | 178 }); |
| OLD | NEW |