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 base.require('tracing.trace_model.trace_model_event'); 8 9 /** 10 * @fileoverview Provides the InstantEvent class. 11 */ 12 base.exportTo('tracing.trace_model', function() { 13 var InstantEventType = { 14 GLOBAL: 1, 15 PROCESS: 2, 16 THREAD: 3 17 }; 18 19 function InstantEvent(category, title, colorId, start, args) { 20 tracing.trace_model.TraceModelEvent.apply(this, arguments); 21 22 this.type = undefined; 23 }; 24 25 InstantEvent.prototype = { 26 __proto__: tracing.trace_model.TraceModelEvent.prototype 27 }; 28 29 function GlobalInstantEvent(category, title, colorId, start, args) { 30 InstantEvent.apply(this, arguments); 31 this.type = InstantEventType.GLOBAL; 32 }; 33 34 GlobalInstantEvent.prototype = { 35 __proto__: InstantEvent.prototype 36 }; 37 38 function ProcessInstantEvent(category, title, colorId, start, args) { 39 InstantEvent.apply(this, arguments); 40 this.type = InstantEventType.PROCESS; 41 }; 42 43 ProcessInstantEvent.prototype = { 44 __proto__: InstantEvent.prototype 45 }; 46 47 function ThreadInstantEvent(category, title, colorId, start, args) { 48 InstantEvent.apply(this, arguments); 49 this.type = InstantEventType.THREAD; 50 }; 51 52 ThreadInstantEvent.prototype = { 53 __proto__: InstantEvent.prototype 54 }; 55 56 return { 57 GlobalInstantEvent: GlobalInstantEvent, 58 ProcessInstantEvent: ProcessInstantEvent, 59 ThreadInstantEvent: ThreadInstantEvent, 60 61 InstantEventType: InstantEventType 62 }; 63 }); 64