1 // Copyright 2020 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 package org.chromium.weblayer; 6 7 import androidx.annotation.NonNull; 8 9 /** 10 * Receives messages from a JavaScript object that was created by calling {@link 11 * Tab#registerWebMessageCallback(). 12 * 13 * @since 85 14 */ 15 public abstract class WebMessageCallback { 16 /** 17 * Called when a message is received from the page. 18 * 19 * @param replyProxy An object that may be used to post a message back to the page. 20 * @param message The message from the page. 21 */ onWebMessageReceived( @onNull WebMessageReplyProxy replyProxy, @NonNull WebMessage message)22 public void onWebMessageReceived( 23 @NonNull WebMessageReplyProxy replyProxy, @NonNull WebMessage message) {} 24 } 25