Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: tracing/tracing/value/ui/diagnostic_span.html

Issue 3001953002: Linkify sample Breakdowns via RelatedHistogramBreakdowns. (Closed)
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tracing/tracing/value/ui/breakdown_span_test.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright 2016 The Chromium Authors. All rights reserved. 3 Copyright 2016 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 7
8 <link rel="import" href="/tracing/ui/base/deep_utils.html"> 8 <link rel="import" href="/tracing/ui/base/deep_utils.html">
9 <link rel="import" href="/tracing/value/diagnostics/diagnostic.html"> 9 <link rel="import" href="/tracing/value/diagnostics/diagnostic.html">
10 <link rel="import" href="/tracing/value/ui/breakdown_span.html"> 10 <link rel="import" href="/tracing/value/ui/breakdown_span.html">
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 * Create a visualization for |diagnostic|. 60 * Create a visualization for |diagnostic|.
61 * 61 *
62 * @param {!tr.v.d.Diagnostic} diagnostic 62 * @param {!tr.v.d.Diagnostic} diagnostic
63 * @param {string} name 63 * @param {string} name
64 * @param {!tr.v.Histogram} histogram 64 * @param {!tr.v.Histogram} histogram
65 * @return {Element} 65 * @return {Element}
66 */ 66 */
67 function createDiagnosticSpan(diagnostic, name, histogram) { 67 function createDiagnosticSpan(diagnostic, name, histogram) {
68 const tagName = findElementNameForDiagnostic(diagnostic); 68 const tagName = findElementNameForDiagnostic(diagnostic);
69 const span = document.createElement(tagName); 69 const span = document.createElement(tagName);
70 if (span.build === undefined) throw new Error(tagName); 70 if (span.build === undefined) {
71 throw new Error(`Invalid diagnostic span "${tagName}"`);
72 }
71 span.build(diagnostic, name, histogram); 73 span.build(diagnostic, name, histogram);
72 return span; 74 return span;
73 } 75 }
74 76
75 return { 77 return {
76 createDiagnosticSpan, 78 createDiagnosticSpan,
77 }; 79 };
78 }); 80 });
79 </script> 81 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/value/ui/breakdown_span_test.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698