| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright 2017 The Chromium Authors. All rights reserved. | 3 Copyright 2017 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/base/range.html"> | 8 <link rel="import" href="/tracing/base/math/range.html"> |
| 9 | 9 |
| 10 <script> | 10 <script> |
| 11 'use strict'; | 11 'use strict'; |
| 12 tr.exportTo('tr.v.ui', function() { | 12 tr.exportTo('tr.v.ui', function() { |
| 13 class HistogramSetTableCellState { | 13 class HistogramSetTableCellState { |
| 14 constructor() { | 14 constructor() { |
| 15 this.isOpen_ = false; | 15 this.isOpen_ = false; |
| 16 this.brushedBinRange_ = new tr.b.Range(); | 16 this.brushedBinRange_ = new tr.b.math.Range(); |
| 17 this.mergeSampleDiagnostics_ = true; | 17 this.mergeSampleDiagnostics_ = true; |
| 18 } | 18 } |
| 19 | 19 |
| 20 get isOpen() { | 20 get isOpen() { |
| 21 return this.isOpen_; | 21 return this.isOpen_; |
| 22 } | 22 } |
| 23 | 23 |
| 24 set isOpen(o) { | 24 set isOpen(o) { |
| 25 this.isOpen_ = o; | 25 this.isOpen_ = o; |
| 26 } | 26 } |
| (...skipping 25 matching lines...) Expand all Loading... |
| 52 return dict; | 52 return dict; |
| 53 } | 53 } |
| 54 | 54 |
| 55 static fromDict(dict) { | 55 static fromDict(dict) { |
| 56 const cell = new HistogramSetTableCellState(); | 56 const cell = new HistogramSetTableCellState(); |
| 57 if (dict.isOpen) cell.isOpen = true; | 57 if (dict.isOpen) cell.isOpen = true; |
| 58 if (dict.mergeSampleDiagnostics === false) { | 58 if (dict.mergeSampleDiagnostics === false) { |
| 59 cell.mergeSampleDiagnostics = false; | 59 cell.mergeSampleDiagnostics = false; |
| 60 } | 60 } |
| 61 if (dict.brushedBinRange) { | 61 if (dict.brushedBinRange) { |
| 62 cell.brushedBinRange = tr.b.Range.fromExplicitRange( | 62 cell.brushedBinRange = tr.b.math.Range.fromExplicitRange( |
| 63 dict.brushedBinRange[0], dict.brushedBinRange[1]); | 63 dict.brushedBinRange[0], dict.brushedBinRange[1]); |
| 64 } | 64 } |
| 65 return cell; | 65 return cell; |
| 66 } | 66 } |
| 67 | 67 |
| 68 clone() { | 68 clone() { |
| 69 return HistogramSetTableCellState.fromDict(this.asDict()); | 69 return HistogramSetTableCellState.fromDict(this.asDict()); |
| 70 } | 70 } |
| 71 } | 71 } |
| 72 | 72 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 return HistogramSetTableRowState.fromDict(this.asDict()); | 154 return HistogramSetTableRowState.fromDict(this.asDict()); |
| 155 } | 155 } |
| 156 } | 156 } |
| 157 | 157 |
| 158 return { | 158 return { |
| 159 HistogramSetTableCellState, | 159 HistogramSetTableCellState, |
| 160 HistogramSetTableRowState, | 160 HistogramSetTableRowState, |
| 161 }; | 161 }; |
| 162 }); | 162 }); |
| 163 </script> | 163 </script> |
| OLD | NEW |