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

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

Issue 9583009: [File Manager] Cleanup: Moving js/css/html files to dedicated directories (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 2011->2012 Created 8 years, 9 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 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 importScripts('../util.js');
15 16
16 /** 17 /**
17 * Dispatches metadata requests to the correct parser. 18 * Dispatches metadata requests to the correct parser.
18 */ 19 */
19 function MetadataDispatcher() { 20 function MetadataDispatcher() {
20 // Make sure to ipdate component_extension_resources.grd 21 // Make sure to ipdate component_extension_resources.grd
21 // when adding new parsers. 22 // when adding new parsers.
22 importScripts('exif_parser.js'); 23 importScripts('exif_parser.js');
23 importScripts('image_parsers.js'); 24 importScripts('image_parsers.js');
24 importScripts('mpeg_parser.js'); 25 importScripts('mpeg_parser.js');
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 // Reuse the last step from the standard sequence. 206 // Reuse the last step from the standard sequence.
206 steps[steps.length - 1] 207 steps[steps.length - 1]
207 ]; 208 ];
208 } 209 }
209 210
210 nextStep(); 211 nextStep();
211 }; 212 };
212 213
213 var dispatcher = new MetadataDispatcher(); 214 var dispatcher = new MetadataDispatcher();
214 global.onmessage = dispatcher.onMessage.bind(dispatcher); 215 global.onmessage = dispatcher.onMessage.bind(dispatcher);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698