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

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

Issue 8727028: Eliminate use of assignments to innerHTML in File Browser (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Deleted another redundant file Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 28 matching lines...) Expand all
39 this.mouseOverTool_ = false; 39 this.mouseOverTool_ = false;
40 40
41 this.initDom_(shareActions); 41 this.initDom_(shareActions);
42 } 42 }
43 43
44 Gallery.prototype = { __proto__: RibbonClient.prototype }; 44 Gallery.prototype = { __proto__: RibbonClient.prototype };
45 45
46 Gallery.open = function(parentDirEntry, items, selectedItem, 46 Gallery.open = function(parentDirEntry, items, selectedItem,
47 closeCallback, metadataProvider, shareActions, displayStringFunction) { 47 closeCallback, metadataProvider, shareActions, displayStringFunction) {
48 var container = document.querySelector('.gallery'); 48 var container = document.querySelector('.gallery');
49 container.innerHTML = ''; 49 ImageUtil.removeChildren(container);
50 var gallery = new Gallery(container, closeCallback, metadataProvider, 50 var gallery = new Gallery(container, closeCallback, metadataProvider,
51 shareActions, displayStringFunction); 51 shareActions, displayStringFunction);
52 gallery.load(parentDirEntry, items, selectedItem); 52 gallery.load(parentDirEntry, items, selectedItem);
53 }; 53 };
54 54
55 Gallery.editorModes = [ 55 Gallery.editorModes = [
56 new ImageEditor.Mode.InstantAutofix(), 56 new ImageEditor.Mode.InstantAutofix(),
57 new ImageEditor.Mode.Crop(), 57 new ImageEditor.Mode.Crop(),
58 new ImageEditor.Mode.Exposure(), 58 new ImageEditor.Mode.Exposure(),
59 new ImageEditor.Mode.OneClick('rotate_left', new Command.Rotate(-1)), 59 new ImageEditor.Mode.OneClick('rotate_left', new Command.Rotate(-1)),
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 ShareMode.prototype.setUp = function() { 976 ShareMode.prototype.setUp = function() {
977 ImageEditor.Mode.prototype.setUp.apply(this, arguments); 977 ImageEditor.Mode.prototype.setUp.apply(this, arguments);
978 ImageUtil.setAttribute(this.menu_, 'hidden', false); 978 ImageUtil.setAttribute(this.menu_, 'hidden', false);
979 ImageUtil.setAttribute(this.button_, 'pressed', false); 979 ImageUtil.setAttribute(this.button_, 'pressed', false);
980 }; 980 };
981 981
982 ShareMode.prototype.cleanUpUI = function() { 982 ShareMode.prototype.cleanUpUI = function() {
983 ImageEditor.Mode.prototype.cleanUpUI.apply(this, arguments); 983 ImageEditor.Mode.prototype.cleanUpUI.apply(this, arguments);
984 ImageUtil.setAttribute(this.menu_, 'hidden', true); 984 ImageUtil.setAttribute(this.menu_, 'hidden', true);
985 }; 985 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698