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

Side by Side Diff: chrome/browser/resources/file_manager/gallery_harness.html

Issue 10919292: Photo Editor: better mode transitions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <!-- 2 <!--
3 -- Copyright (c) 2011 The Chromium Authors. All rights reserved. 3 -- Copyright (c) 2011 The Chromium Authors. All rights reserved.
4 -- Use of this source code is governed by a BSD-style license that can be 4 -- Use of this source code is governed by a BSD-style license that can be
5 -- found in the LICENSE file. 5 -- found in the LICENSE file.
6 --> 6 -->
7 <html> 7 <html>
8 <head> 8 <head>
9 <style> 9 <style>
10 body { 10 body {
(...skipping 14 matching lines...) Expand all
25 <script> 25 <script>
26 // Put the images in this directory next to this html file. 26 // Put the images in this directory next to this html file.
27 var IMPORT_SOURCE = 'harness_images'; 27 var IMPORT_SOURCE = 'harness_images';
28 28
29 var GALLERY_ROOT = 'images'; 29 var GALLERY_ROOT = 'images';
30 30
31 var IMPORTED_KEY = 'galleryDataImported'; 31 var IMPORTED_KEY = 'galleryDataImported';
32 32
33 function initGallery(galleryWindow) { 33 function initGallery(galleryWindow) {
34 galleryWindow.chrome.fileBrowserPrivate.FS_TYPE = window.TEMPORARY; 34 galleryWindow.chrome.fileBrowserPrivate.FS_TYPE = window.TEMPORARY;
35 galleryWindow.Gallery.openStandalone(GALLERY_ROOT); 35
36 var path = location.hash ?
37 decodeURIComponent(location.hash.substr(1)) :
38 GALLERY_ROOT;
39
40 var pageState;
41 try {
42 pageState = JSON.parse(decodeURIComponent(location.search.substr(1)));
43 } catch (ignore) {}
44
45 galleryWindow.Gallery.openStandalone(path, pageState);
36 } 46 }
37 47
38 function loadGallery() { 48 function loadGallery() {
39 var iframe = document.createElement('iframe'); 49 var iframe = document.createElement('iframe');
40 document.body.appendChild(iframe); 50 document.body.appendChild(iframe);
41 iframe.onload = function() { initGallery(iframe.contentWindow) }; 51 iframe.onload = function() { initGallery(iframe.contentWindow) };
42 iframe.src = "gallery.html"; 52 iframe.src = 'gallery.html';
43 } 53 }
44 54
45 function importImages(filesystem) { 55 function importImages(filesystem) {
46 var fileCount = 0; 56 var fileCount = 0;
47 var byteCount = 0; 57 var byteCount = 0;
48 var time = Date.now(); 58 var time = Date.now();
49 59
50 function displayProgress(blob) { 60 function displayProgress(blob) {
51 fileCount++; 61 fileCount++;
52 byteCount += blob.size; 62 byteCount += blob.size;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 getFilesystem(function(filesystem) { 96 getFilesystem(function(filesystem) {
87 harness.resetFilesystem(filesystem, onPageLoad); 97 harness.resetFilesystem(filesystem, onPageLoad);
88 }); 98 });
89 } 99 }
90 100
91 document.addEventListener('DOMContentLoaded', onPageLoad); 101 document.addEventListener('DOMContentLoaded', onPageLoad);
92 </script> 102 </script>
93 </head> 103 </head>
94 <body></body> 104 <body></body>
95 </html> 105 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698