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

Unified Diff: Source/devtools/front_end/network/NetworkPanel.js

Issue 632253002: DevTools: Network Panel: update "Record Network Log" button title according to state. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/network/NetworkPanel.js
diff --git a/Source/devtools/front_end/network/NetworkPanel.js b/Source/devtools/front_end/network/NetworkPanel.js
index b74e9678710ee0d2b30cfed4f8c3a615ec366324..f81014547c0120c343bd2624a94713fd3b87be6b 100644
--- a/Source/devtools/front_end/network/NetworkPanel.js
+++ b/Source/devtools/front_end/network/NetworkPanel.js
@@ -74,7 +74,7 @@ WebInspector.NetworkLogView = function(filterBar, coulmnsVisibilitySetting)
this._addFilters();
this._resetSuggestionBuilder();
this._initializeView();
- this._recordButton.toggled = true;
+ this._toggleRecordButton(true);
WebInspector.targetManager.observeTargets(this);
WebInspector.targetManager.addModelListener(WebInspector.NetworkManager, WebInspector.NetworkManager.EventTypes.RequestStarted, this._onRequestStarted, this);
@@ -726,7 +726,7 @@ WebInspector.NetworkLogView.prototype = {
_createStatusbarButtons: function()
{
- this._recordButton = new WebInspector.StatusBarButton(WebInspector.UIString("Record Network Log"), "record-profile-status-bar-item");
+ this._recordButton = new WebInspector.StatusBarButton("", "record-profile-status-bar-item");
this._recordButton.addEventListener("click", this._onRecordButtonClicked, this);
this._clearButton = new WebInspector.StatusBarButton(WebInspector.UIString("Clear"), "clear-status-bar-item");
@@ -839,7 +839,16 @@ WebInspector.NetworkLogView.prototype = {
{
if (!this._recordButton.toggled)
this._reset();
- this._recordButton.toggled = !this._recordButton.toggled;
+ this._toggleRecordButton(!this._recordButton.toggled);
+ },
+
+ /**
+ * @param {boolean} toggled
+ */
+ _toggleRecordButton: function(toggled)
+ {
+ this._recordButton.toggled = toggled;
+ this._recordButton.title = toggled ? WebInspector.UIString("Stop Recording Network Log") : WebInspector.UIString("Record Network Log");
},
_reset: function()
« 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