Commit ab77ab90 authored by eustas@chromium.org's avatar eustas@chromium.org

DevTools: Network Panel: update "Record Network Log" button title according to state.

Title should reflect action that will happen when button is pressed.

BUG=414140

Review URL: https://codereview.chromium.org/632253002

git-svn-id: svn://svn.chromium.org/blink/trunk@183649 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 79be3634
...@@ -74,7 +74,7 @@ WebInspector.NetworkLogView = function(filterBar, coulmnsVisibilitySetting) ...@@ -74,7 +74,7 @@ WebInspector.NetworkLogView = function(filterBar, coulmnsVisibilitySetting)
this._addFilters(); this._addFilters();
this._resetSuggestionBuilder(); this._resetSuggestionBuilder();
this._initializeView(); this._initializeView();
this._recordButton.toggled = true; this._toggleRecordButton(true);
WebInspector.targetManager.observeTargets(this); WebInspector.targetManager.observeTargets(this);
WebInspector.targetManager.addModelListener(WebInspector.NetworkManager, WebInspector.NetworkManager.EventTypes.RequestStarted, this._onRequestStarted, this); WebInspector.targetManager.addModelListener(WebInspector.NetworkManager, WebInspector.NetworkManager.EventTypes.RequestStarted, this._onRequestStarted, this);
...@@ -726,7 +726,7 @@ WebInspector.NetworkLogView.prototype = { ...@@ -726,7 +726,7 @@ WebInspector.NetworkLogView.prototype = {
_createStatusbarButtons: function() _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._recordButton.addEventListener("click", this._onRecordButtonClicked, this);
this._clearButton = new WebInspector.StatusBarButton(WebInspector.UIString("Clear"), "clear-status-bar-item"); this._clearButton = new WebInspector.StatusBarButton(WebInspector.UIString("Clear"), "clear-status-bar-item");
...@@ -839,7 +839,16 @@ WebInspector.NetworkLogView.prototype = { ...@@ -839,7 +839,16 @@ WebInspector.NetworkLogView.prototype = {
{ {
if (!this._recordButton.toggled) if (!this._recordButton.toggled)
this._reset(); 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() _reset: function()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment