Index: media/base/android/java/src/org/chromium/media/IDialogSurfaceActivityMapper.aidl |
diff --git a/media/base/android/java/src/org/chromium/media/IDialogSurfaceActivityMapper.aidl b/media/base/android/java/src/org/chromium/media/IDialogSurfaceActivityMapper.aidl |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9e85bd93aa434c8eb56808e92b89970ec31978a4 |
--- /dev/null |
+++ b/media/base/android/java/src/org/chromium/media/IDialogSurfaceActivityMapper.aidl |
@@ -0,0 +1,29 @@ |
+// 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. |
+ * |
+ * Right now, all of this works on (pid, renderFrameId) pairs. For security, |
+ * we might want to switch to some sort of token that's acquired by the renderer |
+ * and sent to the DialogSurface. Otherwise, the GPU process can guess at |
+ * renderFrameIds for any renderer pid. |
+ * |
+ * Note also that using pids introduces a race condition, in that one renderer |
+ * might fail and be replced with another with the same pid. |
+ */ |
+interface IDialogSurfaceActivityMapper { |
+ /** |
+ * Eventually call back holder::onWindowToken with the window token for the |
+ * activity that hosts (rendererPid, renderFrameId). This will call back, |
+ * but may call back with null. |
+ */ |
+ void postWindowToken(int rendererPid, int renderFrameId, IDialogSurfaceHolder holder); |
+} |