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

Side by Side Diff: chrome/browser/resources/file_manager/js/photo/gallery.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 util.addPageLoadHandler(function() { 5 util.addPageLoadHandler(function() {
6 if (!location.hash) 6 if (!location.hash)
7 return; 7 return;
8 8
9 var pageState; 9 var pageState;
10 if (location.search) { 10 if (location.search) {
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 * Initialize listeners. 178 * Initialize listeners.
179 * @private 179 * @private
180 */ 180 */
181 Gallery.prototype.initListeners_ = function() { 181 Gallery.prototype.initListeners_ = function() {
182 if (!util.TEST_HARNESS) 182 if (!util.TEST_HARNESS)
183 this.document_.oncontextmenu = function(e) { e.preventDefault(); }; 183 this.document_.oncontextmenu = function(e) { e.preventDefault(); };
184 184
185 this.keyDownBound_ = this.onKeyDown_.bind(this); 185 this.keyDownBound_ = this.onKeyDown_.bind(this);
186 this.document_.body.addEventListener('keydown', this.keyDownBound_); 186 this.document_.body.addEventListener('keydown', this.keyDownBound_);
187 187
188 util.disableBrowserShortcutKeys(this.document_);
189
188 this.inactivityWatcher_ = new MouseInactivityWatcher( 190 this.inactivityWatcher_ = new MouseInactivityWatcher(
189 this.container_, Gallery.FADE_TIMEOUT, this.hasActiveTool.bind(this)); 191 this.container_, Gallery.FADE_TIMEOUT, this.hasActiveTool.bind(this));
190 192
191 // Search results may contain files from different subdirectories so 193 // Search results may contain files from different subdirectories so
192 // the observer is not going to work. 194 // the observer is not going to work.
193 if (!this.context_.searchResults) { 195 if (!this.context_.searchResults) {
194 this.thumbnailObserverId_ = this.metadataCache_.addObserver( 196 this.thumbnailObserverId_ = this.metadataCache_.addObserver(
195 this.context_.curDirEntry, 197 this.context_.curDirEntry,
196 MetadataCache.CHILDREN, 198 MetadataCache.CHILDREN,
197 'thumbnail', 199 'thumbnail',
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 Gallery.prototype.updateThumbnails_ = function() { 895 Gallery.prototype.updateThumbnails_ = function() {
894 if (this.currentMode_ == this.slideMode_) 896 if (this.currentMode_ == this.slideMode_)
895 this.slideMode_.updateThumbnails(); 897 this.slideMode_.updateThumbnails();
896 898
897 if (this.mosaicMode_) { 899 if (this.mosaicMode_) {
898 var mosaic = this.mosaicMode_.getMosaic(); 900 var mosaic = this.mosaicMode_.getMosaic();
899 if (mosaic.isInitialized()) 901 if (mosaic.isInitialized())
900 mosaic.reload(); 902 mosaic.reload();
901 } 903 }
902 }; 904 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/js/media/video_player.js ('k') | chrome/browser/resources/file_manager/js/util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698