OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of repositories; | 5 part of repositories; |
6 | 6 |
7 class TargetChangeEvent implements M.TargetChangeEvent { | 7 class TargetChangeEvent implements M.TargetChangeEvent { |
8 final TargetRepository repository; | 8 final TargetRepository repository; |
9 final bool disconnected; | 9 final bool disconnected; |
10 TargetChangeEvent(this.repository, [this.disconnected = false]); | 10 TargetChangeEvent(this.repository, [this.disconnected = false]); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 SC.WebSocketVMTarget find(String networkAddress) { | 94 SC.WebSocketVMTarget find(String networkAddress) { |
95 for (SC.WebSocketVMTarget item in _list) { | 95 for (SC.WebSocketVMTarget item in _list) { |
96 if (item.networkAddress == networkAddress) { | 96 if (item.networkAddress == networkAddress) { |
97 return item; | 97 return item; |
98 } | 98 } |
99 } | 99 } |
100 return null; | 100 return null; |
101 } | 101 } |
102 | 102 |
103 static String _networkAddressOfDefaultTarget() { | 103 static String _networkAddressOfDefaultTarget() { |
| 104 if (!identical(1, 1.0)) { |
| 105 // Dartium, assume we are developing. |
| 106 return 'ws://127.0.0.1:8181/ws'; |
| 107 } |
104 Uri serverAddress = Uri.parse(window.location.toString()); | 108 Uri serverAddress = Uri.parse(window.location.toString()); |
105 return 'ws://${serverAddress.authority}${serverAddress.path}ws'; | 109 return 'ws://${serverAddress.authority}${serverAddress.path}ws'; |
106 } | 110 } |
107 } | 111 } |
OLD | NEW |