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

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

Issue 9570011: Disabling right-click menu in Chrome OS Photo Editor and Media Player (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « chrome/browser/resources/file_manager/js/audio_player.js ('k') | no next file » | 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 /* 5 /*
6 * Base class that Ribbon uses to display photos. 6 * Base class that Ribbon uses to display photos.
7 */ 7 */
8 8
9 function RibbonClient() {} 9 function RibbonClient() {}
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 new ImageEditor.Mode.OneClick('rotate_left', new Command.Rotate(-1)), 63 new ImageEditor.Mode.OneClick('rotate_left', new Command.Rotate(-1)),
64 new ImageEditor.Mode.OneClick('rotate_right', new Command.Rotate(1)) 64 new ImageEditor.Mode.OneClick('rotate_right', new Command.Rotate(1))
65 ]; 65 ];
66 66
67 Gallery.FADE_TIMEOUT = 3000; 67 Gallery.FADE_TIMEOUT = 3000;
68 Gallery.FIRST_FADE_TIMEOUT = 1000; 68 Gallery.FIRST_FADE_TIMEOUT = 1000;
69 69
70 Gallery.prototype.initDom_ = function(shareActions) { 70 Gallery.prototype.initDom_ = function(shareActions) {
71 var doc = this.document_; 71 var doc = this.document_;
72 72
73 doc.oncontextmenu = function(e) { e.preventDefault(); };
74
73 // Clean up after the previous instance of Gallery. 75 // Clean up after the previous instance of Gallery.
74 this.container_.removeAttribute('editing'); 76 this.container_.removeAttribute('editing');
75 this.container_.removeAttribute('tools'); 77 this.container_.removeAttribute('tools');
76 78
77 // The removeEventListener calls below are required to prevent memory leaks in 79 // The removeEventListener calls below are required to prevent memory leaks in
78 // gallery_demo.html where the Gallery is re-created in the same iframe. 80 // gallery_demo.html where the Gallery is re-created in the same iframe.
79 // It is safe to remove these calls once gallery_demo.html is retired. 81 // It is safe to remove these calls once gallery_demo.html is retired.
80 if (window.galleryKeyDown) { 82 if (window.galleryKeyDown) {
81 doc.body.removeEventListener('keydown', window.galleryKeyDown); 83 doc.body.removeEventListener('keydown', window.galleryKeyDown);
82 } 84 }
(...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after
1257 ShareMode.prototype.setUp = function() { 1259 ShareMode.prototype.setUp = function() {
1258 ImageEditor.Mode.prototype.setUp.apply(this, arguments); 1260 ImageEditor.Mode.prototype.setUp.apply(this, arguments);
1259 ImageUtil.setAttribute(this.menu_, 'hidden', false); 1261 ImageUtil.setAttribute(this.menu_, 'hidden', false);
1260 ImageUtil.setAttribute(this.button_, 'pressed', false); 1262 ImageUtil.setAttribute(this.button_, 'pressed', false);
1261 }; 1263 };
1262 1264
1263 ShareMode.prototype.cleanUpUI = function() { 1265 ShareMode.prototype.cleanUpUI = function() {
1264 ImageEditor.Mode.prototype.cleanUpUI.apply(this, arguments); 1266 ImageEditor.Mode.prototype.cleanUpUI.apply(this, arguments);
1265 ImageUtil.setAttribute(this.menu_, 'hidden', true); 1267 ImageUtil.setAttribute(this.menu_, 'hidden', true);
1266 }; 1268 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/js/audio_player.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698