OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |