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

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

Issue 468123002: DevTools: Fix displayName for workers in console selector (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | 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) 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 var toggled = /** @type {boolean} */ (event.data); 275 var toggled = /** @type {boolean} */ (event.data);
276 this._filtersContainer.classList.toggle("hidden", !toggled); 276 this._filtersContainer.classList.toggle("hidden", !toggled);
277 }, 277 },
278 278
279 /** 279 /**
280 * @param {!WebInspector.ExecutionContext} executionContext 280 * @param {!WebInspector.ExecutionContext} executionContext
281 * @return {string} 281 * @return {string}
282 */ 282 */
283 _titleFor: function(executionContext) 283 _titleFor: function(executionContext)
284 { 284 {
285 var result = executionContext.name; 285 var result;
286 if (executionContext.isMainWorldContext && executionContext.frameId) { 286 if (executionContext.isMainWorldContext) {
287 var frame = executionContext.target().resourceTreeModel.frameForId(e xecutionContext.frameId); 287 if (executionContext.frameId) {
288 result = frame ? frame.displayName() : result; 288 var frame = executionContext.target().resourceTreeModel.frameFor Id(executionContext.frameId);
289 } 289 result = frame ? frame.displayName() : executionContext.name;
290 290 } else {
291 if (!executionContext.isMainWorldContext) 291 result = WebInspector.displayNameForURL(executionContext.name)
292 result = "\u00a0\u00a0\u00a0\u00a0" + result; 292 }
293 } else
294 result = "\u00a0\u00a0\u00a0\u00a0" + executionContext.name;
293 295
294 var maxLength = 50; 296 var maxLength = 50;
295 return result.trimMiddle(maxLength); 297 return result.trimMiddle(maxLength);
296 }, 298 },
297 299
298 /** 300 /**
299 * @param {!WebInspector.Event} event 301 * @param {!WebInspector.Event} event
300 */ 302 */
301 _onExecutionContextCreated: function(event) 303 _onExecutionContextCreated: function(event)
302 { 304 {
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
1221 WebInspector.ConsoleView.ShowConsoleActionDelegate.prototype = { 1223 WebInspector.ConsoleView.ShowConsoleActionDelegate.prototype = {
1222 /** 1224 /**
1223 * @return {boolean} 1225 * @return {boolean}
1224 */ 1226 */
1225 handleAction: function() 1227 handleAction: function()
1226 { 1228 {
1227 WebInspector.console.show(); 1229 WebInspector.console.show();
1228 return true; 1230 return true;
1229 } 1231 }
1230 } 1232 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698