1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 * @extends {WebInspector.Infobar}
9 WebInspector.DataSaverInfobar = function()
11 WebInspector.Infobar.call(this, WebInspector.Infobar.Type.Warning, WebInspector.settings.moduleSetting("disableDataSaverInfobar"));
12 this.element.createTextChild(WebInspector.UIString("Consider disabling "));
13 this.element.appendChild(WebInspector.linkifyURLAsNode("https://support.google.com/chrome/answer/2392284?hl=en", "Chrome Data Saver", undefined, true));
14 this.element.createTextChild(WebInspector.UIString(" while debugging."));
17 WebInspector.DataSaverInfobar._infobars = [];
20 * @param {!WebInspector.Panel} panel
22 WebInspector.DataSaverInfobar.maybeShowInPanel = function(panel)
24 if (Runtime.queryParam("remoteFrontend")) {
25 var infobar = new WebInspector.DataSaverInfobar();
26 WebInspector.DataSaverInfobar._infobars.push(infobar);
27 panel.showInfobar(infobar);
31 WebInspector.DataSaverInfobar.prototype = {
37 for (var infobar of WebInspector.DataSaverInfobar._infobars)
38 WebInspector.Infobar.prototype.close.call(infobar);
41 __proto__: WebInspector.Infobar.prototype