Index: tools/memory_inspector/memory_inspector/frontends/www_content/js/processes.js |
diff --git a/tools/memory_inspector/memory_inspector/frontends/www_content/js/processes.js b/tools/memory_inspector/memory_inspector/frontends/www_content/js/processes.js |
index a4a12751b60c160bd4f87ec616839bf1481c0820..a7dc14210cd93d06d12692f3dfe75e90f7f79b71 100644 |
--- a/tools/memory_inspector/memory_inspector/frontends/www_content/js/processes.js |
+++ b/tools/memory_inspector/memory_inspector/frontends/www_content/js/processes.js |
@@ -77,6 +77,26 @@ this.dumpSelectedProcessMmaps_ = function() { |
rootUi.showTab('mm'); |
}; |
+this.showAndroidProvisionDialog_ = function() { |
+ $("#android_provision_dialog").dialog({ |
+ modal: true, |
+ width: '50em', |
+ buttons: { |
+ Continue: function() { |
+ devices.initializeSelectedDevice(true); |
+ $(this).dialog('close'); |
+ rootUi.showDialog( |
+ 'Wait device to complete reboot (~30 s) then retry.', |
+ 'Device rebooting'); |
+ processes.clear(); |
+ }, |
+ Cancel: function() { |
+ $(this).dialog('close'); |
+ } |
+ } |
+ }); |
+}; |
+ |
this.showTracingDialog_ = function() { |
if (!this.selProcUri_) |
return alert('Must select a process!'); |
@@ -92,13 +112,8 @@ this.startTracingSelectedProcess_ = function() { |
$('#ps-tracer-dialog').dialog('close'); |
if (traceNativeHeap && !devices.getSelectedDevice().isNativeTracingEnabled) { |
- var shouldProvision = confirm('Native heap tracing is not enabled.\n' + |
- 'Do you want to enable it (will cause a reboot on Android)?'); |
- if (shouldProvision) { |
- devices.initializeSelectedDevice(true); |
- alert('Wait device to complete reboot and then retry.'); |
+ this.showAndroidProvisionDialog_(); |
return; |
- } |
} |
var postArgs = {interval: $('#ps-tracer-period').val(), |