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

Unified Diff: media/base/android/java/src/org/chromium/media/DialogSurfaceWindowTokenProvider.java

Issue 2178973004: DialogSurfaceManager implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed IDialogSurfaceActivityMapper from common.aidl Created 4 years 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: media/base/android/java/src/org/chromium/media/DialogSurfaceWindowTokenProvider.java
diff --git a/media/base/android/java/src/org/chromium/media/DialogSurfaceWindowTokenProvider.java b/media/base/android/java/src/org/chromium/media/DialogSurfaceWindowTokenProvider.java
new file mode 100644
index 0000000000000000000000000000000000000000..37701ecc7214dfc756bfe534bd8a9179e20a4a97
--- /dev/null
+++ b/media/base/android/java/src/org/chromium/media/DialogSurfaceWindowTokenProvider.java
@@ -0,0 +1,37 @@
+// Copyright 2016 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.media;
+
+import android.os.IBinder;
+
+/**
+ * Class to facilitate mapping (pid, render_frame_id) to an Activity. Should
+ * also handle registering for changes if the render frame is re-parented to
+ * another activity.
+ */
+public interface DialogSurfaceWindowTokenProvider {
+ /**
+ * Client to receive callbacks from the token provider.
+ */
+ interface Client {
+ // Notify the client of a new window token, or null if no token is
+ // currently available. This callback will happen on the UI thread.
+ void onWindowToken(IBinder token);
+ }
+
+ /**
+ * Eventually call back |client::onWindowToken| with the window token for
+ * the activity that hosts (rendererPid, renderFrameId). This will call
+ * back, but may call back with null. It may call back more than once if
+ * the token changes.
+ */
+ void registerClient(int rendererPid, int renderFrameId, Client client);
+
+ /**
+ * Unregister |client| for callbacks. Some callbacks may be in-flight, and
+ * could arrive after this returns.
+ */
+ void unregisterClient(Client client);
+}

Powered by Google App Engine
This is Rietveld 408576698