Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js

Issue 2629503002: DevTools: Replace Timeline "New" button with Close (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698