Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / trace-viewer / trace_viewer / tracing / importer / importer.js
1 // Copyright (c) 2013 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 'use strict';
6
7 /**
8  * @fileoverview Base class for trace data importers.
9  */
10
11 tvcm.exportTo('tracing.importer', function() {
12
13   function Importer() {
14   }
15
16   Importer.prototype = {
17     __proto__: Object.prototype,
18
19     /**
20      * Called by the Model to extract one or more subtraces from the event data.
21      */
22     extractSubtraces: function() {
23       return [];
24     },
25
26     /**
27      * Called to import events into the Model.
28      */
29     importEvents: function() {
30     },
31
32     /**
33      * Called to import sample data into the Model.
34      */
35     importSampleData: function() {
36     },
37
38     /**
39      * Called by the Model after all other importers have imported their
40      * events.
41      */
42     finalizeImport: function() {
43     },
44
45     /**
46      * Called by the Model to join references between objects, after final
47      * model bounds have been computed.
48      */
49     joinRefs: function() {
50     }
51   };
52
53   return {
54     Importer: Importer
55   };
56 });