blob: 858ed0ff3f6049f7659322a71692aa8cff3f36fe [file] [log] [blame]
<!DOCTYPE html>
<!--
Copyright (c) 2015 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<link rel="import" href="/base/ui/color_scheme.html">
<script>
'use strict';
tv.exportTo('tv.c.trace_model', function() {
/**
* EventInfo is an annotation added to Events in order to document
* what they represent, and override their title/colorId values.
*
* TODO(ccraik): eventually support more complex structure/paragraphs.
*
* @param {string} title A user-visible title for the event.
* @param {string} description A user-visible description of the event.
* @param {Array} docLinks A list of Objects, each of the form
* {label: str, textContent: str, href: str}
*
* @constructor
*/
function EventInfo(title, description, docLinks) {
this.title = title;
this.description = description;
this.docLinks = docLinks;
this.colorId = tv.b.ui.getColorIdForGeneralPurposeString(title);
}
return {
EventInfo: EventInfo
};
});
</script>