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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sources/SourcesNavigator.js

Issue 2442543002: DevTools: New snippet button and icon (Closed)
Patch Set: space in css Created 4 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 10 *
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 __proto__: WebInspector.NavigatorView.prototype 202 __proto__: WebInspector.NavigatorView.prototype
203 } 203 }
204 204
205 /** 205 /**
206 * @constructor 206 * @constructor
207 * @extends {WebInspector.NavigatorView} 207 * @extends {WebInspector.NavigatorView}
208 */ 208 */
209 WebInspector.SnippetsNavigatorView = function() 209 WebInspector.SnippetsNavigatorView = function()
210 { 210 {
211 WebInspector.NavigatorView.call(this); 211 WebInspector.NavigatorView.call(this);
212 var toolbar = new WebInspector.Toolbar("snippets-navigator-toolbar");
213 var newButton = new WebInspector.ToolbarButton(WebInspector.UIString("New"), "add-toolbar-item");
214 newButton.addEventListener("click", this._handleCreateSnippet.bind(this));
215 toolbar.appendToolbarItem(newButton);
216 this.element.insertBefore(toolbar.element, this.element.firstChild);
212 } 217 }
213 218
214 WebInspector.SnippetsNavigatorView.prototype = { 219 WebInspector.SnippetsNavigatorView.prototype = {
215 /** 220 /**
216 * @override 221 * @override
217 * @param {!WebInspector.UISourceCode} uiSourceCode 222 * @param {!WebInspector.UISourceCode} uiSourceCode
218 * @return {boolean} 223 * @return {boolean}
219 */ 224 */
220 accept: function(uiSourceCode) 225 accept: function(uiSourceCode)
221 { 226 {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 /** 295 /**
291 * @override 296 * @override
292 */ 297 */
293 sourceDeleted: function(uiSourceCode) 298 sourceDeleted: function(uiSourceCode)
294 { 299 {
295 this._handleRemoveSnippet(uiSourceCode); 300 this._handleRemoveSnippet(uiSourceCode);
296 }, 301 },
297 302
298 __proto__: WebInspector.NavigatorView.prototype 303 __proto__: WebInspector.NavigatorView.prototype
299 } 304 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698