Commit 1165f3fa authored by Guido Urdaneta's avatar Guido Urdaneta Committed by Commit Bot

Add getHardwarePlatformInfo to thunk.js for Hangouts

 Bug: 860311

Change-Id: Ifd314660829cc7434621e22b8d709e6ef233973f
Reviewed-on: https://chromium-review.googlesource.com/1193849
Commit-Queue: Guido Urdaneta <guidou@chromium.org>
Reviewed-by: default avatarHenrik Grunell <grunell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588275}
parent 6eb9eee3
......@@ -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",
......
......@@ -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);
......
......@@ -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.
......
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