Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 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. | |
| 4 | |
| 5 package org.chromium.content.browser.androidoverlay; | |
| 6 | |
| 7 import android.os.Handler; | |
| 8 import android.os.IBinder; | |
| 9 import android.view.Surface; | |
| 10 | |
| 11 /** | |
| 12 * Common operations needed by DialogOverlayImpl, which are handy to mock out. | |
| 13 */ | |
| 14 interface DialogOverlayOperations { | |
|
boliu
2017/04/22 00:22:43
is this interface necessary? I don't see any tests
liberato (no reviews please)
2017/04/24 22:19:42
i had planned to add a DialogOverlayImpl junit tes
| |
| 15 interface WindowTokenListener { | |
| 16 void onWindowToken(final IBinder token); | |
| 17 public void onDismissed(); | |
| 18 } | |
| 19 | |
| 20 /** | |
| 21 * Notify that the overlay has been released by the client. | |
| 22 * This will be called on the Browser UI thread. | |
| 23 */ | |
| 24 void notifyReleased(); | |
| 25 | |
| 26 /** | |
| 27 * Return a Handler that can post tasks to the overlay thread. | |
| 28 */ | |
| 29 Handler getOverlayHandler(); | |
| 30 | |
| 31 /** | |
| 32 * Start receiving window token updates on |listener|. This may only be cal led once. | |
| 33 * @param token routing token that we'll use to find the window token. | |
| 34 * @param listener listener that we'll send updates to. | |
| 35 */ | |
| 36 void registerWindowTokenListener( | |
| 37 org.chromium.mojo.common.mojom.UnguessableToken token, WindowTokenLi stener listener); | |
| 38 | |
| 39 /** | |
| 40 * Unregister the current listener, if any. It is okay to call this without having called | |
| 41 * registerWindowTokenListener, and / or calling this more than once. | |
| 42 */ | |
| 43 void unregisterWindowTokenListenerIfNeeded(); | |
| 44 | |
| 45 /** | |
| 46 * Register a surface and return the surface id for it. | |
| 47 * @param surface Surface that we should register. | |
| 48 * @return surface id that we associated with |surface|. | |
| 49 */ | |
| 50 int registerSurface(Surface surface); | |
| 51 void unregisterSurface(int surfaceId); | |
| 52 } | |
| OLD | NEW |