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

Side by Side Diff: Source/devtools/front_end/sdk/DebuggerScriptMapping.js

Issue 352953002: DevTools: properly support targets in LiveEditSupport (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix test Created 6 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 unified diff | Download patch | Annotate | Revision Log
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 * * 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 22 matching lines...) Expand all
33 * @param {!WebInspector.DebuggerModel} debuggerModel 33 * @param {!WebInspector.DebuggerModel} debuggerModel
34 * @param {!WebInspector.Workspace} workspace 34 * @param {!WebInspector.Workspace} workspace
35 * @param {!WebInspector.NetworkWorkspaceBinding} networkWorkspaceBinding 35 * @param {!WebInspector.NetworkWorkspaceBinding} networkWorkspaceBinding
36 */ 36 */
37 WebInspector.DebuggerScriptMapping = function(debuggerModel, workspace, networkW orkspaceBinding) 37 WebInspector.DebuggerScriptMapping = function(debuggerModel, workspace, networkW orkspaceBinding)
38 { 38 {
39 this._defaultMapping = new WebInspector.DefaultScriptMapping(debuggerModel, workspace); 39 this._defaultMapping = new WebInspector.DefaultScriptMapping(debuggerModel, workspace);
40 this._resourceMapping = new WebInspector.ResourceScriptMapping(debuggerModel , workspace); 40 this._resourceMapping = new WebInspector.ResourceScriptMapping(debuggerModel , workspace);
41 this._compilerMapping = new WebInspector.CompilerScriptMapping(debuggerModel , workspace, networkWorkspaceBinding); 41 this._compilerMapping = new WebInspector.CompilerScriptMapping(debuggerModel , workspace, networkWorkspaceBinding);
42 42
43 /** @type {!WebInspector.LiveEditSupport} */
44 this._liveEditSupport = new WebInspector.LiveEditSupport(debuggerModel.targe t(), WebInspector.workspace);
45
43 debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.ParsedScrip tSource, this._parsedScriptSource, this); 46 debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.ParsedScrip tSource, this._parsedScriptSource, this);
44 debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.FailedToPar seScriptSource, this._parsedScriptSource, this); 47 debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.FailedToPar seScriptSource, this._parsedScriptSource, this);
45 } 48 }
46 49
47 WebInspector.DebuggerScriptMapping.prototype = { 50 WebInspector.DebuggerScriptMapping.prototype = {
48 /** 51 /**
49 * @param {!WebInspector.Event} event 52 * @param {!WebInspector.Event} event
50 */ 53 */
51 _parsedScriptSource: function(event) 54 _parsedScriptSource: function(event)
52 { 55 {
53 var script = /** @type {!WebInspector.Script} */ (event.data); 56 var script = /** @type {!WebInspector.Script} */ (event.data);
54 this._defaultMapping.addScript(script); 57 this._defaultMapping.addScript(script);
55 58
56 if (script.isSnippet()) { 59 if (script.isSnippet()) {
57 WebInspector.scriptSnippetModel.addScript(script); 60 WebInspector.scriptSnippetModel.addScript(script);
58 return; 61 return;
59 } 62 }
60 63
61 this._resourceMapping.addScript(script); 64 this._resourceMapping.addScript(script);
62 65
63 if (WebInspector.settings.jsSourceMapsEnabled.get()) 66 if (WebInspector.settings.jsSourceMapsEnabled.get())
64 this._compilerMapping.addScript(script); 67 this._compilerMapping.addScript(script);
65 }, 68 },
66 69
67 dispose: function() 70 dispose: function()
68 { 71 {
69 this._compilerMapping.dispose(); 72 this._compilerMapping.dispose();
70 this._resourceMapping.dispose(); 73 this._resourceMapping.dispose();
71 this._defaultMapping.dispose(); 74 this._defaultMapping.dispose();
75 },
76
77 /**
78 * @return {!WebInspector.LiveEditSupport}
79 */
80 liveEditSupport: function()
81 {
82 return this._liveEditSupport;
72 } 83 }
73 } 84 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/main/Main.js ('k') | Source/devtools/front_end/sdk/DefaultScriptMapping.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698