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

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

Issue 2172443004: [Offline Pages] Add network status, save request textbox, and offline url link to offline internals… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
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.
dpapad 2016/07/21 18:57:25 What does the boolean indicate? Please explain in
chili 2016/07/21 23:57:20 Done.
103 */
104 addToRequestQueue: function(url) {},
105
106 /**
107 * Gets the current network status in string form.
108 * @return {!Promise<!string>} A promise firing when the network status
dpapad 2016/07/21 18:57:25 "!string" is same as "string", since primitive typ
chili 2016/07/21 23:57:20 Done.
109 * is retrieved.
110 */
111 getNetworkStatus: function() {},
98 }; 112 };
99 113
100 /** 114 /**
101 * @constructor 115 * @constructor
102 * @implements {offlineInternals.OfflineInternalsBrowserProxy} 116 * @implements {offlineInternals.OfflineInternalsBrowserProxy}
103 */ 117 */
104 function OfflineInternalsBrowserProxyImpl() {} 118 function OfflineInternalsBrowserProxyImpl() {}
105 cr.addSingletonGetter(OfflineInternalsBrowserProxyImpl); 119 cr.addSingletonGetter(OfflineInternalsBrowserProxyImpl);
106 120
107 OfflineInternalsBrowserProxyImpl.prototype = { 121 OfflineInternalsBrowserProxyImpl.prototype = {
(...skipping 28 matching lines...) Expand all
136 }, 150 },
137 151
138 /** @override */ 152 /** @override */
139 getEventLogs: function() { 153 getEventLogs: function() {
140 return cr.sendWithPromise('getEventLogs'); 154 return cr.sendWithPromise('getEventLogs');
141 }, 155 },
142 156
143 /** @override */ 157 /** @override */
144 getLoggingState: function() { 158 getLoggingState: function() {
145 return cr.sendWithPromise('getLoggingState'); 159 return cr.sendWithPromise('getLoggingState');
146 } 160 },
161
162 /** @override */
163 addToRequestQueue: function(url) {
164 return cr.sendWithPromise('addToRequestQueue', url);
165 },
166
167 /** @override */
168 getNetworkStatus: function() {
169 return cr.sendWithPromise('getNetworkStatus');
170 },
147 }; 171 };
148 172
149 return { 173 return {
150 OfflineInternalsBrowserProxy: OfflineInternalsBrowserProxy, 174 OfflineInternalsBrowserProxy: OfflineInternalsBrowserProxy,
151 OfflineInternalsBrowserProxyImpl: OfflineInternalsBrowserProxyImpl 175 OfflineInternalsBrowserProxyImpl: OfflineInternalsBrowserProxyImpl
152 }; 176 };
153 }); 177 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698