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 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
854 * @return {!Object} | 854 * @return {!Object} |
855 * @this {Runtime.Extension} | 855 * @this {Runtime.Extension} |
856 */ | 856 */ |
857 function constructInstance() | 857 function constructInstance() |
858 { | 858 { |
859 var result = this._module._instance(className); | 859 var result = this._module._instance(className); |
860 if (!result) | 860 if (!result) |
861 return Promise.reject("Could not instantiate: " + className); | 861 return Promise.reject("Could not instantiate: " + className); |
862 return result; | 862 return result; |
863 } | 863 } |
| 864 }, |
| 865 |
| 866 /** |
| 867 * @param {string} platform |
| 868 * @return {string} |
| 869 */ |
| 870 title: function(platform) |
| 871 { |
| 872 return this._descriptor["title-" + platform] || this._descriptor["title"
]; |
864 } | 873 } |
865 } | 874 } |
866 | 875 |
867 /** | 876 /** |
868 * @constructor | 877 * @constructor |
869 */ | 878 */ |
870 Runtime.ExperimentsSupport = function() | 879 Runtime.ExperimentsSupport = function() |
871 { | 880 { |
872 this._supportEnabled = Runtime.queryParam("experiments") !== null; | 881 this._supportEnabled = Runtime.queryParam("experiments") !== null; |
873 this._experiments = []; | 882 this._experiments = []; |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1051 // This must be constructed after the query parameters have been parsed. | 1060 // This must be constructed after the query parameters have been parsed. |
1052 Runtime.experiments = new Runtime.ExperimentsSupport(); | 1061 Runtime.experiments = new Runtime.ExperimentsSupport(); |
1053 | 1062 |
1054 /** | 1063 /** |
1055 * @type {?string} | 1064 * @type {?string} |
1056 */ | 1065 */ |
1057 Runtime._remoteBase = Runtime.queryParam("remoteBase"); | 1066 Runtime._remoteBase = Runtime.queryParam("remoteBase"); |
1058 | 1067 |
1059 /** @type {!Runtime} */ | 1068 /** @type {!Runtime} */ |
1060 var runtime; | 1069 var runtime; |
OLD | NEW |