OLD | NEW |
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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 /** | 278 /** |
279 * @param {!WebInspector.ExecutionContext} executionContext | 279 * @param {!WebInspector.ExecutionContext} executionContext |
280 * @return {string} | 280 * @return {string} |
281 */ | 281 */ |
282 _titleFor: function(executionContext) | 282 _titleFor: function(executionContext) |
283 { | 283 { |
284 var result; | 284 var result; |
285 if (executionContext.isMainWorldContext) { | 285 if (executionContext.isMainWorldContext) { |
286 if (executionContext.frameId) { | 286 if (executionContext.frameId) { |
287 var frame = executionContext.target().resourceTreeModel.frameFor
Id(executionContext.frameId); | 287 var frame = executionContext.target().resourceTreeModel.frameFor
Id(executionContext.frameId); |
288 result = frame ? frame.displayName() : executionContext.name; | 288 result = frame ? frame.displayName() : executionContext.origin; |
289 } else { | 289 } else { |
290 result = WebInspector.displayNameForURL(executionContext.name) | 290 result = WebInspector.displayNameForURL(executionContext.origin) |
291 } | 291 } |
292 } else | 292 } else |
293 result = "\u00a0\u00a0\u00a0\u00a0" + executionContext.name; | 293 result = "\u00a0\u00a0\u00a0\u00a0" + (executionContext.name || exec
utionContext.origin); |
294 | 294 |
295 var maxLength = 50; | 295 var maxLength = 50; |
296 return result.trimMiddle(maxLength); | 296 return result.trimMiddle(maxLength); |
297 }, | 297 }, |
298 | 298 |
299 /** | 299 /** |
300 * @param {!WebInspector.Event} event | 300 * @param {!WebInspector.Event} event |
301 */ | 301 */ |
302 _onExecutionContextCreated: function(event) | 302 _onExecutionContextCreated: function(event) |
303 { | 303 { |
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1216 WebInspector.ConsoleView.ShowConsoleActionDelegate.prototype = { | 1216 WebInspector.ConsoleView.ShowConsoleActionDelegate.prototype = { |
1217 /** | 1217 /** |
1218 * @return {boolean} | 1218 * @return {boolean} |
1219 */ | 1219 */ |
1220 handleAction: function() | 1220 handleAction: function() |
1221 { | 1221 { |
1222 WebInspector.console.show(); | 1222 WebInspector.console.show(); |
1223 return true; | 1223 return true; |
1224 } | 1224 } |
1225 } | 1225 } |
OLD | NEW |