Commit 8c4cb744 authored by Leo Zhang's avatar Leo Zhang Committed by Commit Bot

Fix js err for ime extension binding.

Bug:837156

Change-Id: I4456e92e52cf503843da3190661b9de6cf5029ae
Reviewed-on: https://chromium-review.googlesource.com/c/1460276Reviewed-by: default avatarDarren Shen <shend@chromium.org>
Commit-Queue: Leo Zhang <googleo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#630142}
parent 9ba291e3
......@@ -203,26 +203,24 @@ class ImeService {
}
/**
* Set a handler for the bound client delegate to process messages in text
* format. This should be called after an IME engine is activated.
* Set a handler for the client delegate to process plain text messages.
*
* @param {!function(string):string} callback Callback on text message.
*/
setDelegateTextHandler(callback) {
if (this.clientChannel_ && this.clientChannel_.ptr.isBound()) {
if (this.clientChannel_) {
this.clientChannel_.onTextMessage(callback);
}
}
/**
* Set a handler for the bound client delegate to process messages in protobuf
* format. This should be called after an IME engine is activated.
* Set a handler for the client delegate to process protobuf messages.
*
* @param {!function(!Uint8Array):!Uint8Array} callback Callback on protobuf
* message.
*/
setDelegateProtobufHandler(callback) {
if (this.clientChannel_ && this.clientChannel_.ptr.isBound()) {
if (this.clientChannel_) {
this.clientChannel_.onProtobufMessage(callback);
}
}
......
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