OLD | NEW |
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 'use strict'; | 5 'use strict'; |
6 | 6 |
7 /** | 7 /** |
8 * FileManager constructor. | 8 * FileManager constructor. |
9 * | 9 * |
10 * FileManager objects encapsulate the functionality of the file selector | 10 * FileManager objects encapsulate the functionality of the file selector |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 | 473 |
474 this.textContextMenu_ = | 474 this.textContextMenu_ = |
475 this.dialogDom_.querySelector('#text-context-menu'); | 475 this.dialogDom_.querySelector('#text-context-menu'); |
476 cr.ui.Menu.decorate(this.textContextMenu_); | 476 cr.ui.Menu.decorate(this.textContextMenu_); |
477 | 477 |
478 this.gearButton_ = this.dialogDom_.querySelector('#gear-button'); | 478 this.gearButton_ = this.dialogDom_.querySelector('#gear-button'); |
479 this.gearButton_.addEventListener('menushow', | 479 this.gearButton_.addEventListener('menushow', |
480 this.onShowGearMenu_.bind(this)); | 480 this.onShowGearMenu_.bind(this)); |
481 chrome.fileBrowserPrivate.onDesktopChanged.addListener(function() { | 481 chrome.fileBrowserPrivate.onDesktopChanged.addListener(function() { |
482 this.updateVisitDesktopMenus_(); | 482 this.updateVisitDesktopMenus_(); |
483 this.ui_.updateProfileBadge(); | |
484 }.bind(this)); | 483 }.bind(this)); |
485 chrome.fileBrowserPrivate.onProfileAdded.addListener( | 484 chrome.fileBrowserPrivate.onProfileAdded.addListener( |
486 this.updateVisitDesktopMenus_.bind(this)); | 485 this.updateVisitDesktopMenus_.bind(this)); |
487 this.updateVisitDesktopMenus_(); | 486 this.updateVisitDesktopMenus_(); |
488 | 487 |
489 this.dialogDom_.querySelector('#gear-menu').menuItemSelector = | 488 this.dialogDom_.querySelector('#gear-menu').menuItemSelector = |
490 'menuitem, hr'; | 489 'menuitem, hr'; |
491 cr.ui.decorate(this.gearButton_, cr.ui.MenuButton); | 490 cr.ui.decorate(this.gearButton_, cr.ui.MenuButton); |
492 | 491 |
493 this.syncButton.checkable = true; | 492 this.syncButton.checkable = true; |
(...skipping 3273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3767 callback(this.preferences_); | 3766 callback(this.preferences_); |
3768 return; | 3767 return; |
3769 } | 3768 } |
3770 | 3769 |
3771 chrome.fileBrowserPrivate.getPreferences(function(prefs) { | 3770 chrome.fileBrowserPrivate.getPreferences(function(prefs) { |
3772 this.preferences_ = prefs; | 3771 this.preferences_ = prefs; |
3773 callback(prefs); | 3772 callback(prefs); |
3774 }.bind(this)); | 3773 }.bind(this)); |
3775 }; | 3774 }; |
3776 })(); | 3775 })(); |
OLD | NEW |