Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(328)

Unified Diff: remoting/android/java/src/org/chromium/chromoting/ClientExtension.java

Issue 451973002: Capabilities + Extensions + Cast Host Extension Support for Android client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor Fix Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: remoting/android/java/src/org/chromium/chromoting/ClientExtension.java
diff --git a/remoting/android/java/src/org/chromium/chromoting/ClientExtension.java b/remoting/android/java/src/org/chromium/chromoting/ClientExtension.java
new file mode 100644
index 0000000000000000000000000000000000000000..070dcc71bfc407b40cce103ffe1358bfaa2b1cd5
--- /dev/null
+++ b/remoting/android/java/src/org/chromium/chromoting/ClientExtension.java
@@ -0,0 +1,32 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chromoting;
+
+import android.app.Activity;
+
+/**
+ * Interface to extend the Android client's functionality by providing a way to communicate with
+ * the Chromoting host.
+ */
+public interface ClientExtension {
+
+ /** Returns the capability supported by this extension, or an empty string. */
+ public String getCapability();
+
+ /**
+ * Called when the client receives an extension message from the host through JniInterface. It
+ * returns true if the message was handled appropriately, and false otherwise.
+ */
+ public boolean onExtensionMessage(String type, String data);
+
+ /**
+ * Called when an activity offers to accept an ActivityListener for its lifecycle events.
+ * This gives Extensions the option to hook into an existing Activity, get notified about
+ * changes in its state and modify its behavior. Returns the extension's activity listener,
+ * or null.
+ */
+ public ActivityLifecycleListener onActivityAcceptingListener(Activity activity);
+
+}

Powered by Google App Engine
This is Rietveld 408576698