OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 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.chromoting; |
| 6 |
| 7 import android.app.Activity; |
| 8 |
| 9 /** |
| 10 * Interface to extend the Android client's functionality by providing a way to
communicate with |
| 11 * the Chromoting host. |
| 12 */ |
| 13 public interface ClientExtension { |
| 14 |
| 15 /** Returns the capability supported by this extension, or an empty string.
*/ |
| 16 public String getCapability(); |
| 17 |
| 18 /** |
| 19 * Called when the client receives an extension message from the host throug
h JniInterface. It |
| 20 * returns true if the message was handled appropriately, and false otherwis
e. |
| 21 */ |
| 22 public boolean onExtensionMessage(String type, String data); |
| 23 |
| 24 /** |
| 25 * Called when an activity offers to accept an ActivityListener for its life
cycle events. |
| 26 * This gives Extensions the option to hook into an existing Activity, get n
otified about |
| 27 * changes in its state and modify its behavior. Returns the extension's act
ivity listener, |
| 28 * or null. |
| 29 */ |
| 30 public ActivityLifecycleListener onActivityAcceptingListener(Activity activi
ty); |
| 31 |
| 32 } |
OLD | NEW |