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

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

Issue 14096016: Restyled Files.app's file list, including scrollbars. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 7 years, 8 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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'; 5 'use strict';
6 6
7 /** 7 /**
8 * Utility methods. They are intended for use only in this file. 8 * Utility methods. They are intended for use only in this file.
9 */ 9 */
10 var DirectoryTreeUtil = {}; 10 var DirectoryTreeUtil = {};
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 } 409 }
410 410
411 // Fallback to the default directory. 411 // Fallback to the default directory.
412 this.directoryModel_.changeDirectory( 412 this.directoryModel_.changeDirectory(
413 this.directoryModel_.getDefaultDirectory()); 413 this.directoryModel_.getDefaultDirectory());
414 }.bind(this)); 414 }.bind(this));
415 415
416 this.privateOnDirectoryChangedBound_ = this.onDirectoryChanged_.bind(this); 416 this.privateOnDirectoryChangedBound_ = this.onDirectoryChanged_.bind(this);
417 chrome.fileBrowserPrivate.onDirectoryChanged.addListener( 417 chrome.fileBrowserPrivate.onDirectoryChanged.addListener(
418 this.privateOnDirectoryChangedBound_); 418 this.privateOnDirectoryChangedBound_);
419
420 if (util.platform.newUI())
421 ScrollBar.createVertical(this.parentNode, this);
419 }; 422 };
420 423
421 /** 424 /**
422 * Sets a context menu. Context menu is enabled only on archive and removable 425 * Sets a context menu. Context menu is enabled only on archive and removable
423 * volumes as of now. 426 * volumes as of now.
424 * 427 *
425 * @param {cr.ui.Menu} menu Context menu. 428 * @param {cr.ui.Menu} menu Context menu.
426 */ 429 */
427 DirectoryTree.prototype.setContextMenu = function(menu) { 430 DirectoryTree.prototype.setContextMenu = function(menu) {
428 this.contextMenu_ = menu; 431 this.contextMenu_ = menu;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 } 496 }
494 }; 497 };
495 498
496 /** 499 /**
497 * Returns the path of the selected item. 500 * Returns the path of the selected item.
498 * @return {string} The current path. 501 * @return {string} The current path.
499 */ 502 */
500 DirectoryTree.prototype.getCurrentPath = function() { 503 DirectoryTree.prototype.getCurrentPath = function() {
501 return this.selectedItem ? this.selectedItem.fullPath : null; 504 return this.selectedItem ? this.selectedItem.fullPath : null;
502 }; 505 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/js/scrollbar.js ('k') | chrome/browser/resources/file_manager/main_new_ui.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698