OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 g_browserBridge; | 5 var g_browserBridge; |
6 var g_mainView; | 6 var g_mainView; |
7 | 7 |
8 // TODO(eroman): The handling of "max" across snapshots is not correct. | 8 // TODO(eroman): The handling of "max" across snapshots is not correct. |
9 // For starters the browser needs to be aware to generate new maximums. | 9 // For starters the browser needs to be aware to generate new maximums. |
10 // Secondly, we need to take into account the "max" of intermediary snapshots, | 10 // Secondly, we need to take into account the "max" of intermediary snapshots, |
(...skipping 1783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1794 | 1794 |
1795 var dump = { | 1795 var dump = { |
1796 'userAgent': navigator.userAgent, | 1796 'userAgent': navigator.userAgent, |
1797 'version': 1, | 1797 'version': 1, |
1798 'snapshots': snapshots | 1798 'snapshots': snapshots |
1799 }; | 1799 }; |
1800 | 1800 |
1801 var dumpText = JSON.stringify(dump, null, ' '); | 1801 var dumpText = JSON.stringify(dump, null, ' '); |
1802 var textBlob = new Blob([dumpText], | 1802 var textBlob = new Blob([dumpText], |
1803 { type: 'octet/stream', endings: 'native' }); | 1803 { type: 'octet/stream', endings: 'native' }); |
1804 var blobUrl = window.webkitURL.createObjectURL(textBlob); | 1804 var blobUrl = window.URL.createObjectURL(textBlob); |
1805 $(DOWNLOAD_ANCHOR_ID).href = blobUrl; | 1805 $(DOWNLOAD_ANCHOR_ID).href = blobUrl; |
1806 $(DOWNLOAD_ANCHOR_ID).click(); | 1806 $(DOWNLOAD_ANCHOR_ID).click(); |
1807 }, | 1807 }, |
1808 | 1808 |
1809 loadFileChanged_: function() { | 1809 loadFileChanged_: function() { |
1810 this.loadSnapshots_($(SNAPSHOT_FILE_LOADER_ID).files[0]); | 1810 this.loadSnapshots_($(SNAPSHOT_FILE_LOADER_ID).files[0]); |
1811 }, | 1811 }, |
1812 | 1812 |
1813 loadSnapshots_: function(file) { | 1813 loadSnapshots_: function(file) { |
1814 if (file) { | 1814 if (file) { |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2214 groupKey.push(entry); | 2214 groupKey.push(entry); |
2215 } | 2215 } |
2216 | 2216 |
2217 return JSON.stringify(groupKey); | 2217 return JSON.stringify(groupKey); |
2218 }; | 2218 }; |
2219 }, | 2219 }, |
2220 }; | 2220 }; |
2221 | 2221 |
2222 return MainView; | 2222 return MainView; |
2223 })(); | 2223 })(); |
OLD | NEW |