| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright (c) 2013 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
| 5 found in the LICENSE file. | 5 found in the LICENSE file. |
| 6 --> | 6 --> |
| 7 <link rel="import" href="/tracing/base/base.html"> | 7 <link rel="import" href="/tracing/base/base.html"> |
| 8 <link rel="import" href="/tracing/base/extension_registry.html"> | 8 <link rel="import" href="/tracing/base/extension_registry.html"> |
| 9 <script> | 9 <script> |
| 10 'use strict'; | 10 'use strict'; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 var options = new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE); | 67 var options = new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE); |
| 68 options.defaultMetadata = {}; | 68 options.defaultMetadata = {}; |
| 69 options.mandatoryBaseClass = Importer; | 69 options.mandatoryBaseClass = Importer; |
| 70 tr.b.decorateExtensionRegistry(Importer, options); | 70 tr.b.decorateExtensionRegistry(Importer, options); |
| 71 | 71 |
| 72 Importer.findImporterFor = function(eventData) { | 72 Importer.findImporterFor = function(eventData) { |
| 73 var typeInfo = Importer.findTypeInfoMatching(function(ti) { | 73 var typeInfo = Importer.findTypeInfoMatching(function(ti) { |
| 74 return ti.constructor.canImport(eventData); | 74 return ti.constructor.canImport(eventData); |
| 75 }); | 75 }); |
| 76 if (typeInfo) | 76 if (typeInfo) { |
| 77 return typeInfo.constructor; | 77 return typeInfo.constructor; |
| 78 } |
| 78 return undefined; | 79 return undefined; |
| 79 }; | 80 }; |
| 80 | 81 |
| 81 return { | 82 return { |
| 82 Importer, | 83 Importer, |
| 83 }; | 84 }; |
| 84 }); | 85 }); |
| 85 </script> | 86 </script> |
| OLD | NEW |