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

Side by Side Diff: chrome/browser/resources/file_manager/js/metadata_dispatcher.js

Issue 8363054: Fixing FileManagerDialogBrowserTest (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 1 month 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 | « no previous file | 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) 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 // Webworker spec says that the worker global object is called self. That's 5 // Webworker spec says that the worker global object is called self. That's
6 // a terrible name since we use it all over the chrome codebase to capture 6 // a terrible name since we use it all over the chrome codebase to capture
7 // the 'this' keyword in lambdas. 7 // the 'this' keyword in lambdas.
8 var global = self; 8 var global = self;
9 9
10 // All of these scripts could be imported with a single call to importScripts, 10 // All of these scripts could be imported with a single call to importScripts,
11 // but then load and compile time errors would all be reported from the same 11 // but then load and compile time errors would all be reported from the same
12 // line. 12 // line.
13 importScripts('metadata_parser.js'); 13 importScripts('metadata_parser.js');
14 importScripts('byte_reader.js'); 14 importScripts('byte_reader.js');
15 15
16 /** 16 /**
17 * Dispatches metadata requests to the correct parser. 17 * Dispatches metadata requests to the correct parser.
18 */ 18 */
19 function MetadataDispatcher() { 19 function MetadataDispatcher() {
20 importScripts('exif_parser.js'); 20 importScripts('exif_parser.js');
21 importScripts('image_parsers.js'); 21 // importScripts('image_parsers.js');
22 // The line above is commented out because it caused some browser tests
23 // to fail. This is likely to be caused by crbug.com/101665.
24 // TODO(kaznacheev) wait until is gets resoved and rerun tests.
22 importScripts('mpeg_parser.js'); 25 importScripts('mpeg_parser.js');
23 importScripts('id3_parser.js'); 26 importScripts('id3_parser.js');
24 27
25 var patterns = ['blob:']; // We use blob urls in gallery_demo.js 28 var patterns = ['blob:']; // We use blob urls in gallery_demo.js
26 29
27 for (var i = 0; i < MetadataDispatcher.parserClasses_.length; i++) { 30 for (var i = 0; i < MetadataDispatcher.parserClasses_.length; i++) {
28 var parserClass = MetadataDispatcher.parserClasses_[i]; 31 var parserClass = MetadataDispatcher.parserClasses_[i];
29 var parser = new parserClass(this); 32 var parser = new parserClass(this);
30 this.log('new parser: ' + parser.type); 33 this.log('new parser: ' + parser.type);
31 this.parserInstances_.push(parser); 34 this.parserInstances_.push(parser);
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // Reuse the last step from the standard sequence. 204 // Reuse the last step from the standard sequence.
202 steps[steps.length - 1] 205 steps[steps.length - 1]
203 ]; 206 ];
204 } 207 }
205 208
206 nextStep(); 209 nextStep();
207 }; 210 };
208 211
209 var dispatcher = new MetadataDispatcher(); 212 var dispatcher = new MetadataDispatcher();
210 global.onmessage = dispatcher.onMessage.bind(dispatcher); 213 global.onmessage = dispatcher.onMessage.bind(dispatcher);
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698