| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 this._lastSnippetEvaluationIndexSetting = WebInspector.settings.createSettin
g("lastSnippetEvaluationIndex", 0); | 48 this._lastSnippetEvaluationIndexSetting = WebInspector.settings.createSettin
g("lastSnippetEvaluationIndex", 0); |
| 49 this._project = new WebInspector.SnippetsProject(workspace, this); | 49 this._project = new WebInspector.SnippetsProject(workspace, this); |
| 50 this._loadSnippets(); | 50 this._loadSnippets(); |
| 51 WebInspector.targetManager.observeTargets(this); | 51 WebInspector.targetManager.observeTargets(this); |
| 52 } | 52 } |
| 53 | 53 |
| 54 WebInspector.ScriptSnippetModel.snippetSourceURLPrefix = "snippets:///"; | 54 WebInspector.ScriptSnippetModel.snippetSourceURLPrefix = "snippets:///"; |
| 55 | 55 |
| 56 | 56 |
| 57 WebInspector.ScriptSnippetModel.prototype = { | 57 WebInspector.ScriptSnippetModel.prototype = { |
| 58 | |
| 59 /** | 58 /** |
| 60 * @override | 59 * @override |
| 61 * @param {!WebInspector.Target} target | 60 * @param {!WebInspector.Target} target |
| 62 */ | 61 */ |
| 63 targetAdded: function(target) | 62 targetAdded: function(target) |
| 64 { | 63 { |
| 65 var debuggerModel = WebInspector.DebuggerModel.fromTarget(target); | 64 var debuggerModel = WebInspector.DebuggerModel.fromTarget(target); |
| 66 if (debuggerModel) | 65 if (debuggerModel) |
| 67 this._mappingForTarget.set(target, new WebInspector.SnippetScriptMap
ping(debuggerModel, this)); | 66 this._mappingForTarget.set(target, new WebInspector.SnippetScriptMap
ping(debuggerModel, this)); |
| 68 }, | 67 }, |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 this._model.deleteScriptSnippet(url); | 668 this._model.deleteScriptSnippet(url); |
| 670 }, | 669 }, |
| 671 | 670 |
| 672 __proto__: WebInspector.ContentProviderBasedProject.prototype | 671 __proto__: WebInspector.ContentProviderBasedProject.prototype |
| 673 } | 672 } |
| 674 | 673 |
| 675 /** | 674 /** |
| 676 * @type {!WebInspector.ScriptSnippetModel} | 675 * @type {!WebInspector.ScriptSnippetModel} |
| 677 */ | 676 */ |
| 678 WebInspector.scriptSnippetModel = new WebInspector.ScriptSnippetModel(WebInspect
or.workspace); | 677 WebInspector.scriptSnippetModel = new WebInspector.ScriptSnippetModel(WebInspect
or.workspace); |
| OLD | NEW |