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.content.Context; |
| 8 |
| 9 import org.chromium.media.mojom.AndroidOverlay; |
| 10 import org.chromium.media.mojom.AndroidOverlayClient; |
| 11 import org.chromium.media.mojom.AndroidOverlayConfig; |
| 12 import org.chromium.media.mojom.AndroidOverlayProvider; |
| 13 import org.chromium.mojo.bindings.InterfaceRequest; |
| 14 import org.chromium.mojo.system.MojoException; |
| 15 import org.chromium.services.service_manager.InterfaceFactory; |
| 16 |
| 17 /** |
| 18 * Default impl of AndroidOverlayProvider. Creates AndroidOverlayImpls. |
| 19 */ |
| 20 public class AndroidOverlayProviderImpl implements AndroidOverlayProvider { |
| 21 private static final String TAG = "AndroidOverlayProvider"; |
| 22 |
| 23 /** |
| 24 * Create an overlay matching |config| for |client|, and bind it to |request
|. Remember that |
| 25 * potentially many providers are created. |
| 26 */ |
| 27 public void createOverlay(InterfaceRequest<AndroidOverlay> request, AndroidO
verlayClient client, |
| 28 AndroidOverlayConfig config) { |
| 29 client.onDestroyed(); |
| 30 } |
| 31 |
| 32 @Override |
| 33 public void close() {} |
| 34 |
| 35 @Override |
| 36 public void onConnectionError(MojoException e) {} |
| 37 |
| 38 /** |
| 39 * Mojo factory. |
| 40 */ |
| 41 public static class Factory implements InterfaceFactory<AndroidOverlayProvid
er> { |
| 42 public Factory(Context context) {} |
| 43 |
| 44 @Override |
| 45 public AndroidOverlayProvider createImpl() { |
| 46 return new AndroidOverlayProviderImpl(); |
| 47 } |
| 48 } |
| 49 } |
OLD | NEW |