Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add browser_proxy.js as the bridge to implement echeapi.d.ts
Bug: b/178379656 Change-Id: I819b18bca7df55691fdd57ecaee94f5ebaf69617 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2717248 Reviewed-by: Daniel Nishi <dhnishi@chromium.org> Commit-Queue: Guanru Lee <guanrulee@chromium.org> Cr-Commit-Position: refs/heads/master@{#858426}
- Loading branch information
Guanru Lee
authored and
Chromium LUCI CQ
committed
Feb 28, 2021
1 parent
4f81039
commit d2144eb
Showing
4 changed files
with
31 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
chromeos/components/eche_app_ui/resources/browser_proxy.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright 2021 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
// The implementation of echeapi.d.ts | ||
const EcheApiBindingImpl = new class { | ||
onWebRtcSignalReceived(callback) { | ||
// TODO(b/178379656): hook the callback to mojo interface. | ||
} | ||
|
||
sendWebRtcSignal(signaling) { | ||
// TODO(b/178379656): hook the sending function to mojo interface. | ||
} | ||
}; | ||
|
||
// Declare module echeapi and bind the implementation to echeapi.d.ts | ||
const echeapi = {}; | ||
echeapi.webrtc = {}; | ||
echeapi.webrtc.sendSignal = | ||
EcheApiBindingImpl.sendWebRtcSignal.bind(EcheApiBindingImpl); | ||
echeapi.webrtc.registerSignalReceiver = | ||
EcheApiBindingImpl.onWebRtcSignalReceived.bind(EcheApiBindingImpl); | ||
window['echeapi'] = echeapi; |
Binary file not shown.