Add ability for NetLogLogger to gather data from more than just NetLog
[chromium-blink-merge.git] / ui / file_manager / gallery / js / error_banner.js
blob3a23a4f74e11c10d93bbc647b066605cdf6ff7a4
1 // Copyright 2014 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.
5 /**
6 * @param {Element} container Content container.
7 * @constructor
8 */
9 function ErrorBanner(container) {
10 this.container_ = container;
11 this.errorBanner_ = this.container_.querySelector('.error-banner');
14 /**
15 * Shows an error message.
16 * @param {string} message Message.
18 ErrorBanner.prototype.show = function(message) {
19 this.errorBanner_.textContent = str(message);
20 this.container_.setAttribute('error', true);
23 /**
24 * Hides an error message.
26 ErrorBanner.prototype.clear = function() {
27 this.container_.removeAttribute('error');