| Index: chrome/browser/android/signin/signin_promo_util_android.cc
|
| diff --git a/chrome/browser/android/signin/signin_promo_util_android.cc b/chrome/browser/android/signin/signin_promo_util_android.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3e3f78f2e6a70c1d62697cb332d1b8206beae855
|
| --- /dev/null
|
| +++ b/chrome/browser/android/signin/signin_promo_util_android.cc
|
| @@ -0,0 +1,33 @@
|
| +// 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/signin/signin_promo_util_android.h"
|
| +
|
| +#include "base/android/context_utils.h"
|
| +#include "base/android/jni_android.h"
|
| +#include "jni/SigninPromoUtil_jni.h"
|
| +#include "ui/android/window_android.h"
|
| +
|
| +namespace chrome {
|
| +namespace android {
|
| +
|
| +// static
|
| +void SigninPromoUtilAndroid::StartAccountSigninActivityForPromo(
|
| + content::ContentViewCore* content_view_core,
|
| + signin_metrics::AccessPoint access_point) {
|
| + if (content_view_core && content_view_core->GetWindowAndroid()) {
|
| + Java_SigninPromoUtil_openAccountSigninActivityForPromo(
|
| + base::android::AttachCurrentThread(),
|
| + content_view_core->GetWindowAndroid()->GetJavaObject().obj(),
|
| + jint(access_point));
|
| + }
|
| +}
|
| +
|
| +// static
|
| +bool SigninPromoUtilAndroid::Register(JNIEnv* env) {
|
| + return RegisterNativesImpl(env);
|
| +}
|
| +
|
| +} // namespace android
|
| +} // namespace chrome
|
|
|