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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js

Issue 2122353002: [DevTools] Make resource tree model optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 }, 180 },
181 181
182 _consoleHistoryAutocompleteChanged: function() 182 _consoleHistoryAutocompleteChanged: function()
183 { 183 {
184 this._prompt.setAddCompletionsFromHistory(this._consoleHistoryAutocomple teSetting.get()); 184 this._prompt.setAddCompletionsFromHistory(this._consoleHistoryAutocomple teSetting.get());
185 }, 185 },
186 186
187 _initConsoleMessages: function() 187 _initConsoleMessages: function()
188 { 188 {
189 var mainTarget = WebInspector.targetManager.mainTarget(); 189 var mainTarget = WebInspector.targetManager.mainTarget();
190 if (!mainTarget || !mainTarget.resourceTreeModel.cachedResourcesLoaded() ) { 190 var resourceTreeModel = mainTarget && WebInspector.ResourceTreeModel.fro mTarget(mainTarget);
191 if (!resourceTreeModel || !resourceTreeModel.cachedResourcesLoaded()) {
191 WebInspector.targetManager.addModelListener(WebInspector.ResourceTre eModel, WebInspector.ResourceTreeModel.EventTypes.CachedResourcesLoaded, this._o nResourceTreeModelLoaded, this); 192 WebInspector.targetManager.addModelListener(WebInspector.ResourceTre eModel, WebInspector.ResourceTreeModel.EventTypes.CachedResourcesLoaded, this._o nResourceTreeModelLoaded, this);
192 return; 193 return;
193 } 194 }
194 this._fetchMultitargetMessages(); 195 this._fetchMultitargetMessages();
195 }, 196 },
196 197
197 /** 198 /**
198 * @param {!WebInspector.Event} event 199 * @param {!WebInspector.Event} event
199 */ 200 */
200 _onResourceTreeModelLoaded: function(event) 201 _onResourceTreeModelLoaded: function(event)
(...skipping 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after
1412 return true; 1413 return true;
1413 } 1414 }
1414 return false; 1415 return false;
1415 } 1416 }
1416 } 1417 }
1417 1418
1418 /** 1419 /**
1419 * @typedef {{messageIndex: number, matchIndex: number}} 1420 * @typedef {{messageIndex: number, matchIndex: number}}
1420 */ 1421 */
1421 WebInspector.ConsoleView.RegexMatchRange; 1422 WebInspector.ConsoleView.RegexMatchRange;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698