Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / remoting / android / java / src / org / chromium / chromoting / ClientExtension.java
blob070dcc71bfc407b40cce103ffe1358bfaa2b1cd5
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;
9 /**
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();
18 /**
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);
24 /**
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,
28 * or null.
30 public ActivityLifecycleListener onActivityAcceptingListener(Activity activity);