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

Side by Side Diff: chrome/browser/resources/file_manager/js/file_grid.js

Issue 12257002: [Cleanup] Files.app: Remove 'this' from class methods. #1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/resources/file_manager/js/file_manager_pyauto.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 * FileGrid constructor. 6 * FileGrid constructor.
7 * 7 *
8 * Represents grid for the Grid Vew in the File Manager. 8 * Represents grid for the Grid Vew in the File Manager.
9 * @constructor 9 * @constructor
10 * @extends {cr.ui.Grid} 10 * @extends {cr.ui.Grid}
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 * @param {HTMLDivElement} box Box to decorate. 87 * @param {HTMLDivElement} box Box to decorate.
88 * @param {Entry} entry Entry which thumbnail is generating for. 88 * @param {Entry} entry Entry which thumbnail is generating for.
89 * @param {MetadataCache} metadataCache To retrieve metadata. 89 * @param {MetadataCache} metadataCache To retrieve metadata.
90 * @param {ThumbnailLoader.FillMode} fillMode Fill mode. 90 * @param {ThumbnailLoader.FillMode} fillMode Fill mode.
91 * @param {function(HTMLElement)} opt_imageLoadCallback Callback called when 91 * @param {function(HTMLElement)} opt_imageLoadCallback Callback called when
92 * the image has been loaded before inserting 92 * the image has been loaded before inserting
93 * it into the DOM. 93 * it into the DOM.
94 */ 94 */
95 FileGrid.decorateThumbnailBox = function( 95 FileGrid.decorateThumbnailBox = function(
96 box, entry, metadataCache, fillMode, opt_imageLoadCallback) { 96 box, entry, metadataCache, fillMode, opt_imageLoadCallback) {
97 var self = this;
98
99 box.className = 'img-container'; 97 box.className = 'img-container';
100 if (entry.isDirectory) { 98 if (entry.isDirectory) {
101 box.setAttribute('generic-thumbnail', 'folder'); 99 box.setAttribute('generic-thumbnail', 'folder');
102 if (opt_imageLoadCallback) 100 if (opt_imageLoadCallback)
103 setTimeout(opt_imageLoadCallback, 0, null /* callback parameter */); 101 setTimeout(opt_imageLoadCallback, 0, null /* callback parameter */);
104 return; 102 return;
105 } 103 }
106 104
107 var imageUrl = entry.toURL(); 105 var imageUrl = entry.toURL();
108 106
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 checkBox.classList.add('white'); 165 checkBox.classList.add('white');
168 var bottom = li.querySelector('.thumbnail-bottom'); 166 var bottom = li.querySelector('.thumbnail-bottom');
169 bottom.appendChild(checkBox); 167 bottom.appendChild(checkBox);
170 bottom.classList.add('show-checkbox'); 168 bottom.classList.add('show-checkbox');
171 } 169 }
172 170
173 // Override the default role 'listitem' to 'option' to match the parent's 171 // Override the default role 'listitem' to 'option' to match the parent's
174 // role (listbox). 172 // role (listbox).
175 li.setAttribute('role', 'option'); 173 li.setAttribute('role', 'option');
176 }; 174 };
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/file_manager/js/file_manager_pyauto.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698