1<!DOCTYPE html> 2<!-- 3Copyright (c) 2013 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/model/async_slice.html"> 8 9<script> 10'use strict'; 11 12tr.exportTo('tr.e.measure', function() { 13 var AsyncSlice = tr.model.AsyncSlice; 14 15 function MeasureAsyncSlice() { 16 this.groupTitle_ = 'Ungrouped Measure'; 17 var matched = /([^\/:]+):([^\/:]+)\/?(.*)/.exec(arguments[1]); 18 if (matched !== null) { 19 arguments[1] = matched[2]; 20 this.groupTitle_ = matched[1]; 21 } 22 AsyncSlice.apply(this, arguments); 23 } 24 25 MeasureAsyncSlice.prototype = { 26 __proto__: AsyncSlice.prototype, 27 28 get viewSubGroupTitle() { 29 return this.groupTitle_; 30 }, 31 32 get title() { 33 return this.title_; 34 }, 35 36 set title(title) { 37 this.title_ = title; 38 } 39 }; 40 41 AsyncSlice.register( 42 MeasureAsyncSlice, 43 { 44 categoryParts: ['blink.user_timing'] 45 }); 46 47 return { 48 MeasureAsyncSlice: MeasureAsyncSlice 49 }; 50}); 51</script> 52