diff options
author | garykac@chromium.org <garykac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-02 16:51:31 +0000 |
---|---|---|
committer | garykac@chromium.org <garykac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-02 16:51:31 +0000 |
commit | 84ab0c46e5a99761c7ba20eb7c01d21552753f99 (patch) | |
tree | aaa3156820d396bf96a8b6da0d97462875d7d1b9 /remoting | |
parent | 1ef068c268ad6d9ce2349b5ef890b30912738195 (diff) | |
download | chromium_src-84ab0c46e5a99761c7ba20eb7c01d21552753f99.zip chromium_src-84ab0c46e5a99761c7ba20eb7c01d21552753f99.tar.gz chromium_src-84ab0c46e5a99761c7ba20eb7c01d21552753f99.tar.bz2 |
[Chromoting] Log extension name and version number on startup.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/9564029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124666 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/webapp/remoting.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/remoting/webapp/remoting.js b/remoting/webapp/remoting.js index e1d1433..75b84b7 100644 --- a/remoting/webapp/remoting.js +++ b/remoting/webapp/remoting.js @@ -30,6 +30,7 @@ remoting.Error = { * Entry point for app initialization. */ remoting.init = function() { + remoting.logExtensionInfoAsync_(); l10n.localize(); var button = document.getElementById('toggle-scaling'); button.title = chrome.i18n.getMessage(/*i18n-content*/'TOOLTIP_SCALING'); @@ -77,6 +78,23 @@ remoting.init = function() { }; /** + * Log information about the current extension. + * The extension manifest is loaded and parsed to extract this info. + */ +remoting.logExtensionInfoAsync_ = function() { + /** @type {XMLHttpRequest} */ + var xhr = new XMLHttpRequest(); + xhr.open('GET', 'manifest.json'); + xhr.onload = function(e) { + var manifest = + /** @type {{name: string, version: string, default_locale: string}} */ + JSON.parse(xhr.responseText); + console.log(manifest.name + ' version: ' + manifest.version); + } + xhr.send(null); +}; + +/** * If the client is connected, or the host is shared, prompt before closing. * * @return {?string} The prompt string if a connection is active. |