OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 var DetailsView = (function() { | 5 var DetailsView = (function() { |
6 'use strict'; | 6 'use strict'; |
7 | 7 |
8 // We inherit from DivView. | 8 // We inherit from DivView. |
9 var superClass = DivView; | 9 var superClass = DivView; |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 if (this.isVisible() && !this.outstandingRepaint_) { | 35 if (this.isVisible() && !this.outstandingRepaint_) { |
36 this.outstandingRepaint_ = true; | 36 this.outstandingRepaint_ = true; |
37 window.setTimeout(this.repaint.bind(this), | 37 window.setTimeout(this.repaint.bind(this), |
38 REPAINT_TIMEOUT_MS); | 38 REPAINT_TIMEOUT_MS); |
39 } | 39 } |
40 }, | 40 }, |
41 | 41 |
42 repaint: function() { | 42 repaint: function() { |
43 this.outstandingRepaint_ = false; | 43 this.outstandingRepaint_ = false; |
44 this.getNode().innerHTML = ''; | 44 this.getNode().innerHTML = ''; |
45 PaintLogView(this.sourceEntries_, this.getNode()); | 45 paintLogView(this.sourceEntries_, this.getNode()); |
46 }, | 46 }, |
47 | 47 |
48 show: function(isVisible) { | 48 show: function(isVisible) { |
49 superClass.prototype.show.call(this, isVisible); | 49 superClass.prototype.show.call(this, isVisible); |
50 if (isVisible) { | 50 if (isVisible) { |
51 this.repaint(); | 51 this.repaint(); |
52 } else { | 52 } else { |
53 this.getNode().innerHTML = ''; | 53 this.getNode().innerHTML = ''; |
54 } | 54 } |
55 } | 55 } |
56 }; | 56 }; |
57 | 57 |
58 function createSortedCopy(origArray) { | 58 function createSortedCopy(origArray) { |
59 var sortedArray = origArray.slice(0); | 59 var sortedArray = origArray.slice(0); |
60 sortedArray.sort(function(a, b) { | 60 sortedArray.sort(function(a, b) { |
61 return a.getSourceId() - b.getSourceId(); | 61 return a.getSourceId() - b.getSourceId(); |
62 }); | 62 }); |
63 return sortedArray; | 63 return sortedArray; |
64 } | 64 } |
65 | 65 |
66 return DetailsView; | 66 return DetailsView; |
67 })(); | 67 })(); |
OLD | NEW |