| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright 2015 The Chromium Authors. All rights reserved. | 3 Copyright 2015 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/base.html'> | 8 <link rel='import' href='/tracing/base/base.html'> |
| 9 <link rel='import' href='/tracing/base/timing.html'> | 9 <link rel='import' href='/tracing/base/timing.html'> |
| 10 <link rel="import" href="/tracing/importer/empty_importer.html"> | 10 <link rel="import" href="/tracing/importer/empty_importer.html"> |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 * during the import process. | 79 * during the import process. |
| 80 */ | 80 */ |
| 81 importTracesWithProgressDialog: function(traces) { | 81 importTracesWithProgressDialog: function(traces) { |
| 82 if (tr.isHeadless) | 82 if (tr.isHeadless) |
| 83 throw new Error('Cannot use this method in headless mode.'); | 83 throw new Error('Cannot use this method in headless mode.'); |
| 84 | 84 |
| 85 var overlay = tr.ui.b.Overlay(); | 85 var overlay = tr.ui.b.Overlay(); |
| 86 overlay.title = 'Importing...'; | 86 overlay.title = 'Importing...'; |
| 87 overlay.userCanClose = false; | 87 overlay.userCanClose = false; |
| 88 overlay.msgEl = document.createElement('div'); | 88 overlay.msgEl = document.createElement('div'); |
| 89 overlay.appendChild(overlay.msgEl); | 89 Polymer.dom(overlay).appendChild(overlay.msgEl); |
| 90 overlay.msgEl.style.margin = '20px'; | 90 overlay.msgEl.style.margin = '20px'; |
| 91 overlay.update = function(msg) { | 91 overlay.update = function(msg) { |
| 92 this.msgEl.textContent = msg; | 92 this.msgEl.textContent = msg; |
| 93 }; | 93 }; |
| 94 overlay.visible = true; | 94 overlay.visible = true; |
| 95 | 95 |
| 96 var promise = | 96 var promise = |
| 97 tr.b.Task.RunWhenIdle(this.createImportTracesTask(overlay, traces)); | 97 tr.b.Task.RunWhenIdle(this.createImportTracesTask(overlay, traces)); |
| 98 promise.then( | 98 promise.then( |
| 99 function() { overlay.visible = false; }, | 99 function() { overlay.visible = false; }, |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 return false; | 386 return false; |
| 387 } | 387 } |
| 388 }; | 388 }; |
| 389 | 389 |
| 390 return { | 390 return { |
| 391 ImportOptions: ImportOptions, | 391 ImportOptions: ImportOptions, |
| 392 Import: Import | 392 Import: Import |
| 393 }; | 393 }; |
| 394 }); | 394 }); |
| 395 </script> | 395 </script> |
| OLD | NEW |