| Index: chrome/browser/resources/file_manager/js/image_editor/gallery_demo.js
|
| diff --git a/chrome/browser/resources/file_manager/js/image_editor/gallery_demo.js b/chrome/browser/resources/file_manager/js/image_editor/gallery_demo.js
|
| index d6b3029c742160f961c4d0f3fa2d2a29ac8ba8a6..a28df8dbe4799a2bf832a958b3180c0ec006d160 100644
|
| --- a/chrome/browser/resources/file_manager/js/image_editor/gallery_demo.js
|
| +++ b/chrome/browser/resources/file_manager/js/image_editor/gallery_demo.js
|
| @@ -17,41 +17,31 @@ var mockActions = [
|
| }];
|
|
|
|
|
| -var mockDisplayStrings = {
|
| - GALLERY_EDIT: 'Edit',
|
| - GALLERY_SHARE: 'Share',
|
| - GALLERY_ENTER_WHEN_DONE: 'Press Enter when done',
|
| - GALLERY_AUTOFIX: 'Auto-fix',
|
| - GALLERY_FIXED: 'Fixed',
|
| - GALLERY_CROP: 'Crop',
|
| - GALLERY_EXPOSURE: 'Brightness',
|
| - GALLERY_BRIGHTNESS: 'Brightness',
|
| - GALLERY_CONTRAST: 'Contrast',
|
| - GALLERY_ROTATE_LEFT: 'Left',
|
| - GALLERY_ROTATE_RIGHT: 'Right',
|
| - GALLERY_UNDO: 'Undo',
|
| - GALLERY_REDO: 'Redo'
|
| -};
|
| +// For quick access from JS console. Use trace.dump() to print all lines.
|
| +var trace;
|
|
|
| function loadGallery(items) {
|
| if (!items) items = [createTestGrid()];
|
|
|
| var iframe = document.querySelector('.gallery-frame');
|
| var contentWindow = iframe.contentWindow;
|
| -
|
| - contentWindow.ImageUtil.trace.bindToDOM(
|
| - document.querySelector('.debug-output'));
|
| -
|
| - contentWindow.Gallery.open(
|
| - null, // No local file access
|
| - items,
|
| - items[0],
|
| - function() {}, // Do nothing on Close
|
| - metadataProvider,
|
| - mockActions,
|
| - function(id) { return mockDisplayStrings[id] || id } );
|
| -
|
| - iframe.focus();
|
| + trace = contentWindow.ImageUtil.trace;
|
| + trace.bindToDOM(document.querySelector('.debug-output'));
|
| +
|
| + contentWindow.ImageUtil.metrics = metrics;
|
| +
|
| + chrome.fileBrowserPrivate.getStrings(function(strings) {
|
| + contentWindow.Gallery.open(
|
| + null, // No local file access
|
| + items,
|
| + items[0],
|
| + function() {}, // Do nothing on Close
|
| + metadataProvider,
|
| + mockActions,
|
| + function(id) { return strings[id] || id } );
|
| +
|
| + iframe.focus();
|
| + });
|
| }
|
|
|
| function createTestGrid() {
|
|
|