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.
5 package org
.chromium
.chromoting
;
7 import android
.app
.Activity
;
10 * Interface to extend the Android client's functionality by providing a way to communicate with
11 * the Chromoting host.
13 public interface ClientExtension
{
15 /** Returns the capability supported by this extension, or an empty string. */
16 public String
getCapability();
19 * Called when the client receives an extension message from the host through JniInterface. It
20 * returns true if the message was handled appropriately, and false otherwise.
22 public boolean onExtensionMessage(String type
, String data
);
25 * Called when an activity offers to accept an ActivityListener for its lifecycle events.
26 * This gives Extensions the option to hook into an existing Activity, get notified about
27 * changes in its state and modify its behavior. Returns the extension's activity listener,
30 public ActivityLifecycleListener
onActivityAcceptingListener(Activity activity
);