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

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: Fixed a bug in console view init 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 var resourcesLoaded = !resourceTreeModel || resourceTreeModel.cachedRes ourcesLoaded;
dgozman 2016/08/23 01:13:35 - style: double space before = - cachedResourcesLo
192 if (!mainTarget || !resourcesLoaded) {
191 WebInspector.targetManager.addModelListener(WebInspector.ResourceTre eModel, WebInspector.ResourceTreeModel.EventTypes.CachedResourcesLoaded, this._o nResourceTreeModelLoaded, this); 193 WebInspector.targetManager.addModelListener(WebInspector.ResourceTre eModel, WebInspector.ResourceTreeModel.EventTypes.CachedResourcesLoaded, this._o nResourceTreeModelLoaded, this);
192 return; 194 return;
193 } 195 }
194 this._fetchMultitargetMessages(); 196 this._fetchMultitargetMessages();
195 }, 197 },
196 198
197 /** 199 /**
198 * @param {!WebInspector.Event} event 200 * @param {!WebInspector.Event} event
199 */ 201 */
200 _onResourceTreeModelLoaded: function(event) 202 _onResourceTreeModelLoaded: function(event)
(...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after
1413 return true; 1415 return true;
1414 } 1416 }
1415 return false; 1417 return false;
1416 } 1418 }
1417 } 1419 }
1418 1420
1419 /** 1421 /**
1420 * @typedef {{messageIndex: number, matchIndex: number}} 1422 * @typedef {{messageIndex: number, matchIndex: number}}
1421 */ 1423 */
1422 WebInspector.ConsoleView.RegexMatchRange; 1424 WebInspector.ConsoleView.RegexMatchRange;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698