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

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

Issue 881263002: DevTools: use target-based model accessors only. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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
« no previous file with comments | « Source/devtools/front_end/sdk/RuntimeModel.js ('k') | Source/devtools/front_end/sdk/Target.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 /** 88 /**
89 * @param {!WebInspector.Target} target 89 * @param {!WebInspector.Target} target
90 * @param {string} sourceMapURL 90 * @param {string} sourceMapURL
91 * @param {string} compiledURL 91 * @param {string} compiledURL
92 * @param {function(?WebInspector.SourceMap)} callback 92 * @param {function(?WebInspector.SourceMap)} callback
93 * @this {WebInspector.SourceMap} 93 * @this {WebInspector.SourceMap}
94 */ 94 */
95 WebInspector.SourceMap.load = function(target, sourceMapURL, compiledURL, callba ck) 95 WebInspector.SourceMap.load = function(target, sourceMapURL, compiledURL, callba ck)
96 { 96 {
97 var resourceTreeModel = WebInspector.resourceTreeModel; 97 var resourceTreeModel = target.resourceTreeModel;
98 if (resourceTreeModel.cachedResourcesLoaded()) 98 if (resourceTreeModel.cachedResourcesLoaded())
99 loadResource(); 99 loadResource();
100 else 100 else
101 resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventT ypes.CachedResourcesLoaded, cachedResourcesLoaded); 101 resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventT ypes.CachedResourcesLoaded, cachedResourcesLoaded);
102 102
103 function cachedResourcesLoaded() 103 function cachedResourcesLoaded()
104 { 104 {
105 resourceTreeModel.removeEventListener(WebInspector.ResourceTreeModel.Eve ntTypes.CachedResourcesLoaded, cachedResourcesLoaded); 105 resourceTreeModel.removeEventListener(WebInspector.ResourceTreeModel.Eve ntTypes.CachedResourcesLoaded, cachedResourcesLoaded);
106 loadResource(); 106 loadResource();
107 } 107 }
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 }, 384 },
385 385
386 /** 386 /**
387 * @return {boolean} 387 * @return {boolean}
388 */ 388 */
389 hasNext: function() 389 hasNext: function()
390 { 390 {
391 return this._position < this._string.length; 391 return this._position < this._string.length;
392 } 392 }
393 } 393 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sdk/RuntimeModel.js ('k') | Source/devtools/front_end/sdk/Target.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698