| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 }, | 121 }, |
| 122 | 122 |
| 123 /** | 123 /** |
| 124 * @param {!WebInspector.Snippet} snippet | 124 * @param {!WebInspector.Snippet} snippet |
| 125 */ | 125 */ |
| 126 _snippetAdded: function(snippet) | 126 _snippetAdded: function(snippet) |
| 127 { | 127 { |
| 128 this._snippets[snippet.id] = snippet; | 128 this._snippets[snippet.id] = snippet; |
| 129 }, | 129 }, |
| 130 | 130 |
| 131 reset: function() | |
| 132 { | |
| 133 this._lastSnippetIdentifierSetting.set(0); | |
| 134 this._snippetsSetting.set([]); | |
| 135 this._snippets = {}; | |
| 136 }, | |
| 137 | |
| 138 __proto__: WebInspector.Object.prototype | 131 __proto__: WebInspector.Object.prototype |
| 139 } | 132 } |
| 140 | 133 |
| 141 /** | 134 /** |
| 142 * @constructor | 135 * @constructor |
| 143 * @extends {WebInspector.Object} | 136 * @extends {WebInspector.Object} |
| 144 * @param {!WebInspector.SnippetStorage} storage | 137 * @param {!WebInspector.SnippetStorage} storage |
| 145 * @param {string} id | 138 * @param {string} id |
| 146 * @param {string=} name | 139 * @param {string=} name |
| 147 * @param {string=} content | 140 * @param {string=} content |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 { | 207 { |
| 215 var serializedSnippet = {}; | 208 var serializedSnippet = {}; |
| 216 serializedSnippet.id = this.id; | 209 serializedSnippet.id = this.id; |
| 217 serializedSnippet.name = this.name; | 210 serializedSnippet.name = this.name; |
| 218 serializedSnippet.content = this.content; | 211 serializedSnippet.content = this.content; |
| 219 return serializedSnippet; | 212 return serializedSnippet; |
| 220 }, | 213 }, |
| 221 | 214 |
| 222 __proto__: WebInspector.Object.prototype | 215 __proto__: WebInspector.Object.prototype |
| 223 } | 216 } |
| OLD | NEW |