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

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

Issue 15764004: DevTools: show extension name in console context switcher (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: correct rebaseline Created 6 years, 3 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 /* 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 /** 274 /**
275 * @param {!WebInspector.ExecutionContext} executionContext 275 * @param {!WebInspector.ExecutionContext} executionContext
276 * @return {string} 276 * @return {string}
277 */ 277 */
278 _titleFor: function(executionContext) 278 _titleFor: function(executionContext)
279 { 279 {
280 var result; 280 var result;
281 if (executionContext.isMainWorldContext) { 281 if (executionContext.isMainWorldContext) {
282 if (executionContext.frameId) { 282 if (executionContext.frameId) {
283 var frame = executionContext.target().resourceTreeModel.frameFor Id(executionContext.frameId); 283 var frame = executionContext.target().resourceTreeModel.frameFor Id(executionContext.frameId);
284 result = frame ? frame.displayName() : executionContext.name; 284 result = frame ? frame.displayName() : (executionContext.origin || executionContext.name);
285 } else { 285 } else {
286 result = WebInspector.displayNameForURL(executionContext.name) 286 result = WebInspector.displayNameForURL(executionContext.origin) || executionContext.name;
287 } 287 }
288 } else 288 } else
289 result = "\u00a0\u00a0\u00a0\u00a0" + executionContext.name; 289 result = "\u00a0\u00a0\u00a0\u00a0" + (executionContext.name || exec utionContext.origin);
290 290
291 var maxLength = 50; 291 var maxLength = 50;
292 return result.trimMiddle(maxLength); 292 return result.trimMiddle(maxLength);
293 }, 293 },
294 294
295 /** 295 /**
296 * @param {!WebInspector.Event} event 296 * @param {!WebInspector.Event} event
297 */ 297 */
298 _onExecutionContextCreated: function(event) 298 _onExecutionContextCreated: function(event)
299 { 299 {
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after
1212 WebInspector.ConsoleView.ShowConsoleActionDelegate.prototype = { 1212 WebInspector.ConsoleView.ShowConsoleActionDelegate.prototype = {
1213 /** 1213 /**
1214 * @return {boolean} 1214 * @return {boolean}
1215 */ 1215 */
1216 handleAction: function() 1216 handleAction: function()
1217 { 1217 {
1218 WebInspector.console.show(); 1218 WebInspector.console.show();
1219 return true; 1219 return true;
1220 } 1220 }
1221 } 1221 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698