| Index: chrome/android/java/src/org/chromium/chrome/browser/blimp/BlimpClientContextFactory.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/blimp/BlimpClientContextFactory.java b/chrome/android/java/src/org/chromium/chrome/browser/blimp/BlimpClientContextFactory.java
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c5459309510c39ea814cff14dce927910f5b34b4
|
| --- /dev/null
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/blimp/BlimpClientContextFactory.java
|
| @@ -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.chrome.browser.blimp;
|
| +
|
| +import org.chromium.blimp_public.BlimpClientContext;
|
| +import org.chromium.chrome.browser.profiles.Profile;
|
| +
|
| +/**
|
| + * This factory creates BlimpClientContexts for the given {@link Profile}.
|
| + */
|
| +public final class BlimpClientContextFactory {
|
| + // Don't instantiate me.
|
| + private BlimpClientContextFactory() {}
|
| +
|
| + /**
|
| + * A factory method to build a {@link BlimpClientContext} object. Each Profile only ever has
|
| + * a single {@link BlimpClientContext}, so the first this method is called (or from native),
|
| + * the {@link BlimpClientContext} will be created, and later calls will return the already
|
| + * created instance.
|
| + * @return The {@link BlimpClientContext} for the given profile object.
|
| + */
|
| + public static BlimpClientContext getBlimpClientContextForProfile(Profile profile) {
|
| + return nativeGetBlimpClientContextForProfile(profile);
|
| + }
|
| +
|
| + private static native BlimpClientContext nativeGetBlimpClientContextForProfile(Profile profile);
|
| +}
|
|
|