OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1086 })();} | 1086 })();} |
1087 | 1087 |
1088 | 1088 |
1089 // This must be constructed after the query parameters have been parsed. | 1089 // This must be constructed after the query parameters have been parsed. |
1090 Runtime.experiments = new Runtime.ExperimentsSupport(); | 1090 Runtime.experiments = new Runtime.ExperimentsSupport(); |
1091 | 1091 |
1092 /** | 1092 /** |
1093 * @type {?string} | 1093 * @type {?string} |
1094 */ | 1094 */ |
1095 Runtime._remoteBase = Runtime.queryParam("remoteBase"); | 1095 Runtime._remoteBase = Runtime.queryParam("remoteBase"); |
| 1096 {(function validateRemoteBase() |
| 1097 { |
| 1098 if (Runtime._remoteBase && !Runtime._remoteBase.startsWith("https://chrome-d
evtools-frontend.appspot.com/")) |
| 1099 Runtime._remoteBase = null; |
| 1100 })();} |
1096 | 1101 |
1097 /** | 1102 /** |
1098 * @param {string} path | 1103 * @param {string} path |
1099 * @return {string} | 1104 * @return {string} |
1100 */ | 1105 */ |
1101 Runtime.resolveSourceURL = function(path) | 1106 Runtime.resolveSourceURL = function(path) |
1102 { | 1107 { |
1103 var sourceURL = window.location.href; | 1108 var sourceURL = window.location.href; |
1104 if (window.location.search) | 1109 if (window.location.search) |
1105 sourceURL = sourceURL.replace(window.location.search, ""); | 1110 sourceURL = sourceURL.replace(window.location.search, ""); |
1106 sourceURL = sourceURL.substring(0, sourceURL.lastIndexOf("/") + 1) + path; | 1111 sourceURL = sourceURL.substring(0, sourceURL.lastIndexOf("/") + 1) + path; |
1107 return "\n/*# sourceURL=" + sourceURL + " */"; | 1112 return "\n/*# sourceURL=" + sourceURL + " */"; |
1108 } | 1113 } |
1109 | 1114 |
1110 /** @type {!Runtime} */ | 1115 /** @type {!Runtime} */ |
1111 var runtime; | 1116 var runtime; |
OLD | NEW |