Skip to content

Commit b97ba7c

Browse files
author
Guido Urdaneta
committed
Add getHardwarePlatformInfo to thunk.js for Hangouts
Bug: 860311 Change-Id: Ifd314660829cc7434621e22b8d709e6ef233973f Reviewed-on: https://chromium-review.googlesource.com/1193849 Commit-Queue: Guido Urdaneta <[email protected]> Reviewed-by: Henrik Grunell <[email protected]> Cr-Original-Commit-Position: refs/heads/master@{#588275}(cherry picked from commit 1165f3f) Reviewed-on: https://chromium-review.googlesource.com/1209382 Reviewed-by: Guido Urdaneta <[email protected]> Cr-Commit-Position: refs/branch-heads/3538@{#84} Cr-Branched-From: 79f7c91-refs/heads/master@{#587811}
1 parent bb5d6c7 commit b97ba7c

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

chrome/browser/resources/hangout_services/manifest.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"name": "Google Hangouts",
66
// Note: Always update the version number when this file is updated. Chrome
77
// triggers extension preferences update on the version increase.
8-
"version": "1.3.8",
8+
"version": "1.3.9",
99
"manifest_version": 2,
1010
"externally_connectable": {
1111
"matches": [
@@ -21,6 +21,7 @@
2121
"incognito": "split",
2222
"permissions": [
2323
"desktopCapture",
24+
"enterprise.hardwarePlatform",
2425
"processes",
2526
"system.cpu",
2627
"webrtcAudioPrivate",

chrome/browser/resources/hangout_services/thunk.js

+4
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,10 @@ chrome.runtime.onMessageExternal.addListener(function(
191191
chrome.webrtcAudioPrivate.setAudioExperiments(
192192
requestInfo, origin, experiments, doSendResponse);
193193
return true;
194+
} else if (method == 'getHardwarePlatformInfo') {
195+
chrome.enterprise.hardwarePlatform.getHardwarePlatformInfo(
196+
doSendResponse);
197+
return true;
194198
}
195199

196200
throw new Error('Unknown method: ' + method);

chrome/test/data/extensions/hangout_services_test.js

+16
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@ function getAssociatedSink(sourceId, callback) {
116116
callback);
117117
}
118118

119+
// Will call |callback(hardwarePlatformInfo)| on completion.
120+
function getHardwarePlatformInfo(callback) {
121+
sendMessage({'method': 'getHardwarePlatformInfo'}, callback);
122+
}
123+
119124
// Will call |callback()| on completion. If the extension you send to
120125
// is not loaded, the extension system will still call |callback()|
121126
// but will set lastError.
@@ -374,6 +379,17 @@ function testStoreLog(callback) {
374379
});
375380
}
376381

382+
function testGetHardwarePlatformInfo(callback) {
383+
getHardwarePlatformInfo(function(hardwarePlatformInfo) {
384+
if (hardwarePlatformInfo.hasOwnProperty('manufacturer') &&
385+
hardwarePlatformInfo.hasOwnProperty('model')) {
386+
callback('');
387+
} else {
388+
callback('Missing information in hardwarePlatformInfo');
389+
}
390+
});
391+
}
392+
377393
function testTimeout(callback) {
378394
// Never call the callback. Used for manually testing that the
379395
// timeout logic of the test framework is correct.

0 commit comments

Comments
 (0)