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

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

Issue 12212187: [Cleanup] Files.app: Misc style fixes in Javascript code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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) 2012 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 // All of these scripts could be imported with a single call to importScripts, 5 // All of these scripts could be imported with a single call to importScripts,
6 // but then load and compile time errors would all be reported from the same 6 // but then load and compile time errors would all be reported from the same
7 // line. 7 // line.
8 importScripts('metadata_parser.js'); 8 importScripts('metadata_parser.js');
9 importScripts('byte_reader.js'); 9 importScripts('byte_reader.js');
10 importScripts('../util.js'); 10 importScripts('../util.js');
11 11
12 /** 12 /**
13 * Dispatches metadata requests to the correct parser. 13 * Dispatches metadata requests to the correct parser.
14 * 14 *
15 * @param {Object} port Worker port.
15 * @constructor 16 * @constructor
16 * @param {Object} port Worker port.
17 */ 17 */
18 function MetadataDispatcher(port) { 18 function MetadataDispatcher(port) {
19 this.port_ = port; 19 this.port_ = port;
20 this.port_.onmessage = this.onMessage.bind(this); 20 this.port_.onmessage = this.onMessage.bind(this);
21 21
22 // Make sure to update component_extension_resources.grd 22 // Make sure to update component_extension_resources.grd
23 // when adding new parsers. 23 // when adding new parsers.
24 importScripts('exif_parser.js'); 24 importScripts('exif_parser.js');
25 importScripts('image_parsers.js'); 25 importScripts('image_parsers.js');
26 importScripts('mpeg_parser.js'); 26 importScripts('mpeg_parser.js');
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 if (global.constructor.name == 'SharedWorkerContext') { 215 if (global.constructor.name == 'SharedWorkerContext') {
216 global.addEventListener('connect', function(e) { 216 global.addEventListener('connect', function(e) {
217 var port = e.ports[0]; 217 var port = e.ports[0];
218 new MetadataDispatcher(port); 218 new MetadataDispatcher(port);
219 port.start(); 219 port.start();
220 }); 220 });
221 } else { 221 } else {
222 // Non-shared worker. 222 // Non-shared worker.
223 new MetadataDispatcher(global); 223 new MetadataDispatcher(global);
224 } 224 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698