diff --git a/chrome/browser/resources/hangout_services/manifest.json b/chrome/browser/resources/hangout_services/manifest.json index 712e83a89b42..94e8e659333d 100644 --- a/chrome/browser/resources/hangout_services/manifest.json +++ b/chrome/browser/resources/hangout_services/manifest.json @@ -5,7 +5,7 @@ "name": "Google Hangouts", // Note: Always update the version number when this file is updated. Chrome // triggers extension preferences update on the version increase. - "version": "1.3.8", + "version": "1.3.9", "manifest_version": 2, "externally_connectable": { "matches": [ @@ -21,6 +21,7 @@ "incognito": "split", "permissions": [ "desktopCapture", + "enterprise.hardwarePlatform", "processes", "system.cpu", "webrtcAudioPrivate", diff --git a/chrome/browser/resources/hangout_services/thunk.js b/chrome/browser/resources/hangout_services/thunk.js index 645a7eb64e3b..953d6cc64d26 100644 --- a/chrome/browser/resources/hangout_services/thunk.js +++ b/chrome/browser/resources/hangout_services/thunk.js @@ -191,6 +191,10 @@ chrome.runtime.onMessageExternal.addListener(function( chrome.webrtcAudioPrivate.setAudioExperiments( requestInfo, origin, experiments, doSendResponse); return true; + } else if (method == 'getHardwarePlatformInfo') { + chrome.enterprise.hardwarePlatform.getHardwarePlatformInfo( + doSendResponse); + return true; } throw new Error('Unknown method: ' + method); diff --git a/chrome/test/data/extensions/hangout_services_test.js b/chrome/test/data/extensions/hangout_services_test.js index efaf60a81687..56211ec07ef4 100644 --- a/chrome/test/data/extensions/hangout_services_test.js +++ b/chrome/test/data/extensions/hangout_services_test.js @@ -116,6 +116,11 @@ function getAssociatedSink(sourceId, callback) { callback); } +// Will call |callback(hardwarePlatformInfo)| on completion. +function getHardwarePlatformInfo(callback) { + sendMessage({'method': 'getHardwarePlatformInfo'}, callback); +} + // Will call |callback()| on completion. If the extension you send to // is not loaded, the extension system will still call |callback()| // but will set lastError. @@ -374,6 +379,17 @@ function testStoreLog(callback) { }); } +function testGetHardwarePlatformInfo(callback) { + getHardwarePlatformInfo(function(hardwarePlatformInfo) { + if (hardwarePlatformInfo.hasOwnProperty('manufacturer') && + hardwarePlatformInfo.hasOwnProperty('model')) { + callback(''); + } else { + callback('Missing information in hardwarePlatformInfo'); + } + }); +} + function testTimeout(callback) { // Never call the callback. Used for manually testing that the // timeout logic of the test framework is correct.