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

Side by Side Diff: chrome/browser/resources/file_manager/js/metadata_parser.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
(Empty)
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
3 // found in the LICENSE file.
4
5 function MetadataParser(parent, type, urlFilter) {
6 this.parent_ = parent;
7 this.type = type;
8 this.urlFilter = urlFilter;
9 this.verbose = parent.verbose;
10 this.mimeType = 'unknown';
11 }
12
13 MetadataParser.prototype.error = function(var_args) {
14 this.parent_.error.apply(this.parent_, arguments);
15 };
16
17 MetadataParser.prototype.log = function(var_args) {
18 this.parent_.log.apply(this.parent_, arguments);
19 };
20
21 MetadataParser.prototype.vlog = function(var_args) {
22 if (this.verbose)
23 this.parent_.log.apply(this.parent_, arguments);
24 };
25
26 MetadataParser.prototype.createDefaultMetadata = function() {
27 return {
28 type: this.type,
29 mimeType: this.mimeType
30 };
31 };
32
33 MetadataParser.prototype.acceptsMimeType = function(mimeType) {
34 return mimeType == this.mimeType;
35 };
36
37 /* Base class for image metadata parsers */
38 function ImageParser(parent, type, urlFilter) {
39 MetadataParser.apply(this, arguments);
40 this.mimeType = 'image/' + this.type;
41 }
42
43 ImageParser.prototype = {__proto__: MetadataParser.prototype};
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698