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

Side by Side Diff: ui/file_manager/gallery/js/error_banner.js

Issue 676633002: Remove file-level 'use strict' from file_manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « ui/file_manager/gallery/js/background.js ('k') | ui/file_manager/gallery/js/gallery.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 'use strict';
6
7 /** 5 /**
8 * @param {Element} container Content container. 6 * @param {Element} container Content container.
9 * @constructor 7 * @constructor
10 */ 8 */
11 function ErrorBanner(container) { 9 function ErrorBanner(container) {
12 this.container_ = container; 10 this.container_ = container;
13 this.errorBanner_ = this.container_.querySelector('.error-banner'); 11 this.errorBanner_ = this.container_.querySelector('.error-banner');
14 } 12 }
15 13
16 /** 14 /**
17 * Shows an error message. 15 * Shows an error message.
18 * @param {string} message Message. 16 * @param {string} message Message.
19 */ 17 */
20 ErrorBanner.prototype.show = function(message) { 18 ErrorBanner.prototype.show = function(message) {
21 this.errorBanner_.textContent = str(message); 19 this.errorBanner_.textContent = str(message);
22 this.container_.setAttribute('error', true); 20 this.container_.setAttribute('error', true);
23 }; 21 };
24 22
25 /** 23 /**
26 * Hides an error message. 24 * Hides an error message.
27 */ 25 */
28 ErrorBanner.prototype.clear = function() { 26 ErrorBanner.prototype.clear = function() {
29 this.container_.removeAttribute('error'); 27 this.container_.removeAttribute('error');
30 }; 28 };
OLDNEW
« no previous file with comments | « ui/file_manager/gallery/js/background.js ('k') | ui/file_manager/gallery/js/gallery.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698