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 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 Loading... |
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 Loading... |
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 }; |
OLD | NEW |