| Index: chrome/browser/resources/file_manager/js/metadata_parser.js
|
| diff --git a/chrome/browser/resources/file_manager/js/metadata_parser.js b/chrome/browser/resources/file_manager/js/metadata_parser.js
|
| index 684ea3fb42a5a41e8eb8c6fbf6f27cc4e7b002e1..a4c2c29f7f2ca7db5c48402994996cdf35a62edd 100644
|
| --- a/chrome/browser/resources/file_manager/js/metadata_parser.js
|
| +++ b/chrome/browser/resources/file_manager/js/metadata_parser.js
|
| @@ -2,8 +2,10 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -function MetadataParser(parent) {
|
| +function MetadataParser(parent, type, urlFilter) {
|
| this.parent_ = parent;
|
| + this.type = type;
|
| + this.urlFilter = urlFilter;
|
| this.verbose = parent.verbose;
|
| }
|
|
|
| @@ -19,3 +21,25 @@ MetadataParser.prototype.vlog = function(var_args) {
|
| if (this.verbose)
|
| this.parent_.log.apply(this.parent_, arguments);
|
| };
|
| +
|
| +MetadataParser.prototype.createDefaultMetadata = function() { return {} };
|
| +
|
| +MetadataParser.prototype.acceptsMimeType = function(mimeType) { return false };
|
| +
|
| +
|
| +/* Base class for image metadata parsers */
|
| +function ImageParser(parent, type, urlFilter) {
|
| + MetadataParser.apply(this, arguments);
|
| + this.mimeType = 'image/' + this.type;
|
| +}
|
| +
|
| +ImageParser.prototype = {__proto__: MetadataParser.prototype};
|
| +
|
| +ImageParser.prototype.createDefaultMetadata = function() {
|
| + return { mimeType: this.mimeType };
|
| +};
|
| +
|
| +ImageParser.prototype.acceptsMimeType = function(mimeType) {
|
| + return mimeType == this.mimeType;
|
| +}
|
| +
|
|
|