1<!DOCTYPE html> 2<!-- 3Copyright (c) 2015 The Chromium Authors. All rights reserved. 4Use of this source code is governed by a BSD-style license that can be 5found in the LICENSE file. 6--> 7<link rel="import" href="/tracing/base/color_scheme.html"> 8 9<script> 10'use strict'; 11 12tr.exportTo('tr.model', function() { 13 var ColorScheme = tr.b.ColorScheme; 14 15 /** 16 * EventInfo is an annotation added to Events in order to document 17 * what they represent, and override their title/colorId values. 18 * 19 * TODO(ccraik): eventually support more complex structure/paragraphs. 20 * 21 * @param {string} title A user-visible title for the event. 22 * @param {string} description A user-visible description of the event. 23 * @param {Array} docLinks A list of Objects, each of the form 24 * {label: str, textContent: str, href: str} 25 * 26 * @constructor 27 */ 28 function EventInfo(title, description, docLinks) { 29 this.title = title; 30 this.description = description; 31 this.docLinks = docLinks; 32 this.colorId = ColorScheme.getColorIdForGeneralPurposeString(title); 33 } 34 35 return { 36 EventInfo: EventInfo 37 }; 38}); 39</script> 40