| Index: chrome/browser/android/blimp/blimp_client_context_factory_android.cc
|
| diff --git a/chrome/browser/android/blimp/blimp_client_context_factory_android.cc b/chrome/browser/android/blimp/blimp_client_context_factory_android.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f2f031a908dc61944fb07df0d8b6fa7f7d0bf3f2
|
| --- /dev/null
|
| +++ b/chrome/browser/android/blimp/blimp_client_context_factory_android.cc
|
| @@ -0,0 +1,32 @@
|
| +// 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.
|
| +
|
| +#include "chrome/browser/android/blimp/blimp_client_context_factory_android.h"
|
| +
|
| +#include "base/android/jni_android.h"
|
| +#include "base/android/scoped_java_ref.h"
|
| +#include "blimp/client/public/blimp_client_context.h"
|
| +#include "chrome/browser/android/blimp/blimp_client_context_factory.h"
|
| +#include "chrome/browser/profiles/profile.h"
|
| +#include "chrome/browser/profiles/profile_android.h"
|
| +#include "jni/BlimpClientContextFactory_jni.h"
|
| +
|
| +namespace content {
|
| +class BrowserContext;
|
| +}
|
| +
|
| +static base::android::ScopedJavaLocalRef<jobject>
|
| +GetBlimpClientContextForProfile(JNIEnv* env,
|
| + const JavaParamRef<jclass>& clazz,
|
| + const JavaParamRef<jobject>& jprofile) {
|
| + Profile* profile = ProfileAndroid::FromProfileAndroid(jprofile);
|
| + DCHECK(profile);
|
| + return BlimpClientContextFactory::GetInstance()
|
| + ->GetForBrowserContext(profile)
|
| + ->GetJavaObject();
|
| +}
|
| +
|
| +bool RegisterBlimpClientContextFactoryJni(JNIEnv* env) {
|
| + return RegisterNativesImpl(env);
|
| +}
|
|
|