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

Unified Diff: Source/devtools/front_end/sources/XHRBreakpointsSidebarPane.js

Issue 1172643002: DevTools: migrate sidebar pane's titleElement to use Toolbar. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: only using latin1 in css Created 5 years, 6 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
Index: Source/devtools/front_end/sources/XHRBreakpointsSidebarPane.js
diff --git a/Source/devtools/front_end/sources/XHRBreakpointsSidebarPane.js b/Source/devtools/front_end/sources/XHRBreakpointsSidebarPane.js
index 49524cfea7a64ba47dd091763b933af5c814f3dc..8832808dcc5e566a8355d50ff7e63b900ad3ba10 100644
--- a/Source/devtools/front_end/sources/XHRBreakpointsSidebarPane.js
+++ b/Source/devtools/front_end/sources/XHRBreakpointsSidebarPane.js
@@ -15,9 +15,9 @@ WebInspector.XHRBreakpointsSidebarPane = function()
/** @type {!Map.<string, !Element>} */
this._breakpointElements = new Map();
- var addButton = this.titleElement.createChild("button", "pane-title-button add");
- addButton.title = WebInspector.UIString("Add XHR breakpoint");
- addButton.addEventListener("click", this._addButtonClicked.bind(this), false);
+ var addButton = new WebInspector.ToolbarButton(WebInspector.UIString("Add breakpoint"), "add-toolbar-item");
+ addButton.addEventListener("click", this._addButtonClicked.bind(this));
+ this.toolbar().appendToolbarItem(addButton);
this.emptyElement.addEventListener("contextmenu", this._emptyElementContextMenu.bind(this), true);
@@ -99,7 +99,6 @@ WebInspector.XHRBreakpointsSidebarPane.prototype = {
var title = url ? WebInspector.UIString("URL contains \"%s\"", url) : WebInspector.UIString("Any XHR");
var label = createCheckboxLabel(title, enabled);
- label.classList.add("checkbox-elem");
element.appendChild(label);
label.checkboxElement.addEventListener("click", this._checkboxClicked.bind(this, url), false);
element._checkboxElement = label.checkboxElement;

Powered by Google App Engine
This is Rietveld 408576698