| Index: content/public/android/java/src/org/chromium/content/browser/androidoverlay/AndroidOverlayProviderImpl.java
|
| diff --git a/content/public/android/java/src/org/chromium/content/browser/androidoverlay/AndroidOverlayProviderImpl.java b/content/public/android/java/src/org/chromium/content/browser/androidoverlay/AndroidOverlayProviderImpl.java
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..fcd867b0e573536dde2e8c49247404614c64bf85
|
| --- /dev/null
|
| +++ b/content/public/android/java/src/org/chromium/content/browser/androidoverlay/AndroidOverlayProviderImpl.java
|
| @@ -0,0 +1,49 @@
|
| +// Copyright 2017 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.content.browser.androidoverlay;
|
| +
|
| +import android.content.Context;
|
| +
|
| +import org.chromium.media.mojom.AndroidOverlayClient;
|
| +import org.chromium.media.mojom.AndroidOverlayConfig;
|
| +import org.chromium.media.mojom.AndroidOverlayProvider;
|
| +import org.chromium.mojo.system.MojoException;
|
| +import org.chromium.services.service_manager.InterfaceFactory;
|
| +
|
| +/**
|
| + * Default impl of AndroidOverlayProvider. Creates AndroidOverlayImpls.
|
| + */
|
| +public class AndroidOverlayProviderImpl implements AndroidOverlayProvider {
|
| + private static final String TAG = "AndroidOverlayProvider";
|
| +
|
| + /**
|
| + * Create an overlay matching |config| and send it to |client|. Remember that potentially many
|
| + * providers are created. That's why we use statics. Yes, our factory might provide a
|
| + * singleton to the 'real' factory or state, but right now we keep very little state.
|
| + */
|
| + public void createOverlay(AndroidOverlayClient client, AndroidOverlayConfig config) {
|
| + AndroidOverlayImpl overlay = new AndroidOverlayImpl(client, config);
|
| + // We could also call |client.onDestroyed| to fail initialization.
|
| + client.onInitialized(overlay);
|
| + }
|
| +
|
| + @Override
|
| + public void close() {}
|
| +
|
| + @Override
|
| + public void onConnectionError(MojoException e) {}
|
| +
|
| + /**
|
| + * Mojo factory.
|
| + */
|
| + public static class Factory implements InterfaceFactory<AndroidOverlayProvider> {
|
| + public Factory(Context context) {}
|
| +
|
| + @Override
|
| + public AndroidOverlayProvider createImpl() {
|
| + return new AndroidOverlayProviderImpl();
|
| + }
|
| + }
|
| +}
|
|
|