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

Side by Side Diff: Source/devtools/front_end/sources/ScriptFormatterEditorAction.js

Issue 471433004: DevTools: Split out the "workspace" and "bindings" modules from "sdk" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove marker interfaces and WI.SourceMapping Created 6 years, 4 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @implements {WebInspector.SourceMapping} 7 * @implements {WebInspector.DebuggerSourceMapping}
8 * @param {!WebInspector.Target} target 8 * @param {!WebInspector.Target} target
9 * @param {!WebInspector.ScriptFormatterEditorAction} editorAction 9 * @param {!WebInspector.ScriptFormatterEditorAction} editorAction
10 */ 10 */
11 WebInspector.FormatterScriptMapping = function(target, editorAction) 11 WebInspector.FormatterScriptMapping = function(target, editorAction)
12 { 12 {
13 this._target = target; 13 this._target = target;
14 this._editorAction = editorAction; 14 this._editorAction = editorAction;
15 } 15 }
16 16
17 WebInspector.FormatterScriptMapping.prototype = { 17 WebInspector.FormatterScriptMapping.prototype = {
18 /** 18 /**
19 * @param {!WebInspector.RawLocation} rawLocation 19 * @param {!WebInspector.DebuggerModel.Location} rawLocation
20 * @return {?WebInspector.UILocation} 20 * @return {?WebInspector.UILocation}
21 */ 21 */
22 rawLocationToUILocation: function(rawLocation) 22 rawLocationToUILocation: function(rawLocation)
23 { 23 {
24 var debuggerModelLocation = /** @type {!WebInspector.DebuggerModel.Locat ion} */ (rawLocation); 24 var debuggerModelLocation = /** @type {!WebInspector.DebuggerModel.Locat ion} */ (rawLocation);
25 var script = debuggerModelLocation.script(); 25 var script = debuggerModelLocation.script();
26 var uiSourceCode = this._editorAction._uiSourceCodes.get(script); 26 var uiSourceCode = this._editorAction._uiSourceCodes.get(script);
27 if (!uiSourceCode) 27 if (!uiSourceCode)
28 return null; 28 return null;
29 29
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 426
427 var targets = WebInspector.targetManager.targets(); 427 var targets = WebInspector.targetManager.targets();
428 for (var i = 0; i < targets.length; ++i) { 428 for (var i = 0; i < targets.length; ++i) {
429 var scriptMapping = /** @type {!WebInspector.FormatterScriptMapp ing} */(this._scriptMappingByTarget.get(targets[i])); 429 var scriptMapping = /** @type {!WebInspector.FormatterScriptMapp ing} */(this._scriptMappingByTarget.get(targets[i]));
430 WebInspector.debuggerWorkspaceBinding.setSourceMapping(targets[i ], formattedUISourceCode, scriptMapping); 430 WebInspector.debuggerWorkspaceBinding.setSourceMapping(targets[i ], formattedUISourceCode, scriptMapping);
431 } 431 }
432 this._showIfNeeded(uiSourceCode, formattedUISourceCode, formatterMap ping); 432 this._showIfNeeded(uiSourceCode, formattedUISourceCode, formatterMap ping);
433 } 433 }
434 } 434 }
435 } 435 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sdk/WorkspaceController.js ('k') | Source/devtools/front_end/workspace/FileManager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698