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

Side by Side Diff: Source/devtools/front_end/components/ExecutionContextModel.js

Issue 1670023002: Fix library name display in devtools (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/2454_1
Patch Set: Created 4 years, 10 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @implements {WebInspector.TargetManager.Observer} 7 * @implements {WebInspector.TargetManager.Observer}
8 * @param {!Element} selectElement 8 * @param {!Element} selectElement
9 */ 9 */
10 WebInspector.ExecutionContextModel = function(selectElement) 10 WebInspector.ExecutionContextModel = function(selectElement)
(...skipping 14 matching lines...) Expand all
25 } 25 }
26 26
27 WebInspector.ExecutionContextModel.prototype = { 27 WebInspector.ExecutionContextModel.prototype = {
28 /** 28 /**
29 * @param {!WebInspector.ExecutionContext} executionContext 29 * @param {!WebInspector.ExecutionContext} executionContext
30 * @return {string} 30 * @return {string}
31 */ 31 */
32 _titleFor: function(executionContext) 32 _titleFor: function(executionContext)
33 { 33 {
34 var result; 34 var result;
35 // Start Dart specific code.
36 if (executionContext.language == "Dart") {
37 return executionContext.name;
38 }
39 // End Dart specific code.
40
35 if (executionContext.isMainWorldContext) { 41 if (executionContext.isMainWorldContext) {
36 if (executionContext.frameId) { 42 if (executionContext.frameId) {
37 var frame = executionContext.target().resourceTreeModel.frameFor Id(executionContext.frameId); 43 var frame = executionContext.target().resourceTreeModel.frameFor Id(executionContext.frameId);
38 result = frame ? frame.displayName() : (executionContext.origin || executionContext.name); 44 result = frame ? frame.displayName() : (executionContext.origin || executionContext.name);
39 } else { 45 } else {
40 var parsedUrl = executionContext.origin.asParsedURL(); 46 var parsedUrl = executionContext.origin.asParsedURL();
41 var name = parsedUrl? parsedUrl.lastPathComponentWithFragment() : executionContext.name; 47 var name = parsedUrl? parsedUrl.lastPathComponentWithFragment() : executionContext.name;
42 result = executionContext.target().decorateLabel(name); 48 result = executionContext.target().decorateLabel(name);
43 } 49 }
44 } else { 50 } else {
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 /** 184 /**
179 * @return {?Element} 185 * @return {?Element}
180 */ 186 */
181 _selectedOption: function() 187 _selectedOption: function()
182 { 188 {
183 if (this._selectElement.selectedIndex >= 0) 189 if (this._selectElement.selectedIndex >= 0)
184 return this._selectElement[this._selectElement.selectedIndex]; 190 return this._selectElement[this._selectElement.selectedIndex];
185 return null; 191 return null;
186 } 192 }
187 } 193 }
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