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

Side by Side Diff: chrome/browser/resources/file_manager/js/action_choice.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
« no previous file with comments | « no previous file | chrome/browser/resources/file_manager/js/file_manager.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 document.addEventListener('DOMContentLoaded', function() { 5 document.addEventListener('DOMContentLoaded', function() {
6 ActionChoice.load(); 6 ActionChoice.load();
7 }); 7 });
8 8
9 /** 9 /**
10 * The main ActionChoice object. 10 * The main ActionChoice object.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 for (var index = 0; index < choices.length; index++) { 80 for (var index = 0; index < choices.length; index++) {
81 choices[index].addEventListener('dblclick', this.onOk_.bind(this)); 81 choices[index].addEventListener('dblclick', this.onOk_.bind(this));
82 } 82 }
83 83
84 this.document_.addEventListener('keydown', this.onKeyDown_.bind(this)); 84 this.document_.addEventListener('keydown', this.onKeyDown_.bind(this));
85 85
86 metrics.startInterval('PhotoImport.Load'); 86 metrics.startInterval('PhotoImport.Load');
87 this.dom_.setAttribute('loading', ''); 87 this.dom_.setAttribute('loading', '');
88 88
89 this.document_.querySelectorAll('.choices input')[0].focus(); 89 this.document_.querySelectorAll('.choices input')[0].focus();
90
91 util.disableBrowserShortcutKeys(this.document_);
90 }; 92 };
91 93
92 /** 94 /**
93 * Checks whether Drive is reachable. 95 * Checks whether Drive is reachable.
94 * @private 96 * @private
95 */ 97 */
96 ActionChoice.prototype.checkDrive_ = function() { 98 ActionChoice.prototype.checkDrive_ = function() {
97 var driveLabel = this.dom_.querySelector('label[for=import-photos-to-drive]'); 99 var driveLabel = this.dom_.querySelector('label[for=import-photos-to-drive]');
98 var driveChoice = this.dom_.querySelector('#import-photos-to-drive'); 100 var driveChoice = this.dom_.querySelector('#import-photos-to-drive');
99 var driveDiv = driveChoice.parentNode; 101 var driveDiv = driveChoice.parentNode;
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 */ 321 */
320 ActionChoice.prototype.recordAction_ = function(action) { 322 ActionChoice.prototype.recordAction_ = function(action) {
321 metrics.recordEnum('PhotoImport.Action', action, 323 metrics.recordEnum('PhotoImport.Action', action,
322 ['import-photos-to-drive', 324 ['import-photos-to-drive',
323 'view-files', 325 'view-files',
324 'view-files-auto', 326 'view-files-auto',
325 'watch-single-video', 327 'watch-single-video',
326 'error', 328 'error',
327 'close']); 329 'close']);
328 }; 330 };
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/file_manager/js/file_manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698