Commit 84ab0c46 authored by garykac@chromium.org's avatar garykac@chromium.org

[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
parent 1ef068c2
...@@ -30,6 +30,7 @@ remoting.Error = { ...@@ -30,6 +30,7 @@ remoting.Error = {
* Entry point for app initialization. * Entry point for app initialization.
*/ */
remoting.init = function() { remoting.init = function() {
remoting.logExtensionInfoAsync_();
l10n.localize(); l10n.localize();
var button = document.getElementById('toggle-scaling'); var button = document.getElementById('toggle-scaling');
button.title = chrome.i18n.getMessage(/*i18n-content*/'TOOLTIP_SCALING'); button.title = chrome.i18n.getMessage(/*i18n-content*/'TOOLTIP_SCALING');
...@@ -76,6 +77,23 @@ remoting.init = function() { ...@@ -76,6 +77,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. * If the client is connected, or the host is shared, prompt before closing.
* *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment