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

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

Issue 12381076: Files.app: Disables browser shortcut keys. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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) 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 // This variable is checked in SelectFileDialogExtensionBrowserTest. 5 // This variable is checked in SelectFileDialogExtensionBrowserTest.
6 var JSErrorCount = 0; 6 var JSErrorCount = 0;
7 7
8 /** 8 /**
9 * Count uncaught exceptions. 9 * Count uncaught exceptions.
10 */ 10 */
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 826
827 this.driveBuyMoreStorageCommand_ = 827 this.driveBuyMoreStorageCommand_ =
828 this.dialogDom_.querySelector('#drive-buy-more-space'); 828 this.dialogDom_.querySelector('#drive-buy-more-space');
829 829
830 this.defaultActionMenuItem_.addEventListener('activate', 830 this.defaultActionMenuItem_.addEventListener('activate',
831 this.dispatchSelectionAction_.bind(this)); 831 this.dispatchSelectionAction_.bind(this));
832 832
833 this.fileTypeSelector_ = this.dialogDom_.querySelector('#file-type'); 833 this.fileTypeSelector_ = this.dialogDom_.querySelector('#file-type');
834 this.initFileTypeFilter_(); 834 this.initFileTypeFilter_();
835 835
836 util.disableBrowserShortcutKeys(this.document_);
837
836 this.updateWindowState_(); 838 this.updateWindowState_();
837 // Populate the static localized strings. 839 // Populate the static localized strings.
838 i18nTemplate.process(this.document_, loadTimeData); 840 i18nTemplate.process(this.document_, loadTimeData);
839 }; 841 };
840 842
841 FileManager.prototype.onBreadcrumbClick_ = function(event) { 843 FileManager.prototype.onBreadcrumbClick_ = function(event) {
842 this.directoryModel_.changeDirectory(event.path); 844 this.directoryModel_.changeDirectory(event.path);
843 }; 845 };
844 846
845 /** 847 /**
(...skipping 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after
2396 case 'Ctrl-17': // Ctrl => Show hidden setting 2398 case 'Ctrl-17': // Ctrl => Show hidden setting
2397 this.dialogDom_.setAttribute('ctrl-pressing', 'true'); 2399 this.dialogDom_.setAttribute('ctrl-pressing', 'true');
2398 return; 2400 return;
2399 2401
2400 case 'Ctrl-190': // Ctrl-. => Toggle filter files. 2402 case 'Ctrl-190': // Ctrl-. => Toggle filter files.
2401 var dm = this.directoryModel_; 2403 var dm = this.directoryModel_;
2402 dm.setFilterHidden(!dm.isFilterHiddenOn()); 2404 dm.setFilterHidden(!dm.isFilterHiddenOn());
2403 event.preventDefault(); 2405 event.preventDefault();
2404 return; 2406 return;
2405 2407
2406 case 'Ctrl-79': // Disable native Ctrl-O (open file).
2407 case 'Ctrl-83': // Disable native Ctrl-S (save as).
2408 case 'Ctrl-85': // Disable native Ctrl-U (view source).
2409 event.preventDefault();
2410 return;
2411
2412 case '27': // Escape => Cancel dialog. 2408 case '27': // Escape => Cancel dialog.
2413 if (this.copyManager_ && 2409 if (this.copyManager_ &&
2414 this.copyManager_.getStatus().totalFiles != 0) { 2410 this.copyManager_.getStatus().totalFiles != 0) {
2415 // If there is a copy in progress, ESC will cancel it. 2411 // If there is a copy in progress, ESC will cancel it.
2416 event.preventDefault(); 2412 event.preventDefault();
2417 this.copyManager_.requestCancel(); 2413 this.copyManager_.requestCancel();
2418 return; 2414 return;
2419 } 2415 }
2420 2416
2421 if (this.butterBar_ && this.butterBar_.hideError()) { 2417 if (this.butterBar_ && this.butterBar_.hideError()) {
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
3126 return this.directoryModel_.getFileList(); 3122 return this.directoryModel_.getFileList();
3127 }; 3123 };
3128 3124
3129 /** 3125 /**
3130 * @return {cr.ui.List} Current list object. 3126 * @return {cr.ui.List} Current list object.
3131 */ 3127 */
3132 FileManager.prototype.getCurrentList = function() { 3128 FileManager.prototype.getCurrentList = function() {
3133 return this.currentList_; 3129 return this.currentList_;
3134 }; 3130 };
3135 })(); 3131 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698