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

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: 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 * Image gallery for viewing and editing image files. 6 * Image gallery for viewing and editing image files.
7 * 7 *
8 * @param {HTMLDivElement} container 8 * @param {HTMLDivElement} container
9 * @param {function} closeCallback 9 * @param {function} closeCallback
10 * @param {MetadataProvider} metadataProvider 10 * @param {MetadataProvider} metadataProvider
(...skipping 13 matching lines...) Expand all
24 this.onFadeTimeoutBound_ = this.onFadeTimeout_.bind(this); 24 this.onFadeTimeoutBound_ = this.onFadeTimeout_.bind(this);
25 this.fadeTimeoutId_ = null; 25 this.fadeTimeoutId_ = null;
26 this.mouseOverTool_ = false; 26 this.mouseOverTool_ = false;
27 27
28 this.initDom_(shareActions); 28 this.initDom_(shareActions);
29 } 29 }
30 30
31 Gallery.open = function(parentDirEntry, items, selectedItem, 31 Gallery.open = function(parentDirEntry, items, selectedItem,
32 closeCallback, metadataProvider, shareActions, displayStringFunction) { 32 closeCallback, metadataProvider, shareActions, displayStringFunction) {
33 var container = document.querySelector('.gallery'); 33 var container = document.querySelector('.gallery');
34 container.innerHTML = ''; 34 ImageUtil.removeChildren(container);
35 var gallery = new Gallery(container, closeCallback, metadataProvider, 35 var gallery = new Gallery(container, closeCallback, metadataProvider,
36 shareActions, displayStringFunction); 36 shareActions, displayStringFunction);
37 gallery.load(parentDirEntry, items, selectedItem); 37 gallery.load(parentDirEntry, items, selectedItem);
38 }; 38 };
39 39
40 Gallery.editorModes = [ 40 Gallery.editorModes = [
41 new ImageEditor.Mode.InstantAutofix(), 41 new ImageEditor.Mode.InstantAutofix(),
42 new ImageEditor.Mode.Crop(), 42 new ImageEditor.Mode.Crop(),
43 new ImageEditor.Mode.Exposure(), 43 new ImageEditor.Mode.Exposure(),
44 new ImageEditor.Mode.OneClick('rotate_left', new Command.Rotate(-1)), 44 new ImageEditor.Mode.OneClick('rotate_left', new Command.Rotate(-1)),
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 ShareMode.prototype.setUp = function() { 875 ShareMode.prototype.setUp = function() {
876 ImageEditor.Mode.prototype.setUp.apply(this, arguments); 876 ImageEditor.Mode.prototype.setUp.apply(this, arguments);
877 ImageUtil.setAttribute(this.menu_, 'hidden', false); 877 ImageUtil.setAttribute(this.menu_, 'hidden', false);
878 ImageUtil.setAttribute(this.button_, 'pressed', false); 878 ImageUtil.setAttribute(this.button_, 'pressed', false);
879 }; 879 };
880 880
881 ShareMode.prototype.cleanUpUI = function() { 881 ShareMode.prototype.cleanUpUI = function() {
882 ImageEditor.Mode.prototype.cleanUpUI.apply(this, arguments); 882 ImageEditor.Mode.prototype.cleanUpUI.apply(this, arguments);
883 ImageUtil.setAttribute(this.menu_, 'hidden', true); 883 ImageUtil.setAttribute(this.menu_, 'hidden', true);
884 }; 884 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698