OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2012 Intel Inc. All rights reserved. | 3 * Copyright (C) 2012 Intel Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 */ | 299 */ |
300 _createSettingCheckbox(name, setting, tooltip) { | 300 _createSettingCheckbox(name, setting, tooltip) { |
301 const checkboxItem = new UI.ToolbarCheckbox(name, tooltip, setting); | 301 const checkboxItem = new UI.ToolbarCheckbox(name, tooltip, setting); |
302 this._recordingOptionUIControls.push(checkboxItem); | 302 this._recordingOptionUIControls.push(checkboxItem); |
303 return checkboxItem; | 303 return checkboxItem; |
304 } | 304 } |
305 | 305 |
306 _recreateToolbarItems() { | 306 _recreateToolbarItems() { |
307 this._panelToolbar.removeToolbarItems(); | 307 this._panelToolbar.removeToolbarItems(); |
308 | 308 |
| 309 // Close |
| 310 if (!this._model.isEmpty()) { |
| 311 const clearButton = new UI.ToolbarButton(Common.UIString('Close profile'),
'largeicon-delete'); |
| 312 clearButton.addEventListener(UI.ToolbarButton.Events.Click, this._clear, t
his); |
| 313 this._panelToolbar.appendToolbarItem(clearButton); |
| 314 this._panelToolbar.appendSeparator(); |
| 315 } |
| 316 |
309 // Record | 317 // Record |
310 const newButton = new UI.ToolbarButton(Common.UIString('New recording'), 'la
rgeicon-add', Common.UIString('New')); | |
311 newButton.setEnabled(!this._model.isEmpty()); | |
312 newButton.addEventListener(UI.ToolbarButton.Events.Click, this._clear, this)
; | |
313 this._panelToolbar.appendToolbarItem(newButton); | |
314 this._panelToolbar.appendSeparator(); | |
315 this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._tog
gleRecordAction)); | 318 this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._tog
gleRecordAction)); |
316 this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButtonForId('mai
n.reload')); | 319 this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButtonForId('mai
n.reload')); |
317 this._panelToolbar.appendSeparator(); | 320 this._panelToolbar.appendSeparator(); |
318 this._panelToolbar.appendToolbarItem(this._configureThrottlingButton); | 321 this._panelToolbar.appendToolbarItem(this._configureThrottlingButton); |
319 this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButtonForId('com
ponents.collect-garbage')); | 322 this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButtonForId('com
ponents.collect-garbage')); |
320 | 323 |
321 // Checkboxes | 324 // Checkboxes |
322 if (!this._model.isEmpty()) { | 325 if (!this._model.isEmpty()) { |
323 this._panelToolbar.appendSeparator(); | 326 this._panelToolbar.appendSeparator(); |
324 this._panelToolbar.appendText(Common.UIString('View:')); | 327 this._panelToolbar.appendText(Common.UIString('View:')); |
(...skipping 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1922 } | 1925 } |
1923 | 1926 |
1924 /** | 1927 /** |
1925 * @override | 1928 * @override |
1926 * @param {!SDK.Target} target | 1929 * @param {!SDK.Target} target |
1927 */ | 1930 */ |
1928 targetRemoved(target) { | 1931 targetRemoved(target) { |
1929 this._targets.remove(target, true); | 1932 this._targets.remove(target, true); |
1930 } | 1933 } |
1931 }; | 1934 }; |
OLD | NEW |