Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 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 #include "chrome/browser/android/signin/signin_promo_util_android.h" | |
| 6 | |
| 7 #include "base/android/context_utils.h" | |
| 8 #include "base/android/jni_android.h" | |
| 9 #include "jni/SigninPromoUtil_jni.h" | |
| 10 #include "ui/android/window_android.h" | |
| 11 | |
| 12 namespace chrome { | |
| 13 namespace android { | |
| 14 | |
| 15 // static | |
| 16 void SigninPromoUtilAndroid::StartAccountSigninActivityForPromo( | |
| 17 content::ContentViewCore* content_view_core, | |
| 18 signin_metrics::AccessPoint access_point) { | |
| 19 if (content_view_core) { | |
| 20 Java_SigninPromoUtil_openAccountSigninActivityForPromo( | |
| 21 base::android::AttachCurrentThread(), | |
| 22 content_view_core->GetWindowAndroid()->GetJavaObject().obj(), | |
|
Ted C
2016/07/19 20:09:19
While reparenting, the window android can be null.
Mathieu
2016/07/19 21:00:19
Done.
| |
| 23 jint(access_point)); | |
| 24 } | |
| 25 } | |
| 26 | |
| 27 // static | |
| 28 bool SigninPromoUtilAndroid::Register(JNIEnv* env) { | |
| 29 return RegisterNativesImpl(env); | |
| 30 } | |
| 31 | |
| 32 } // namespace android | |
| 33 } // namespace chrome | |
| OLD | NEW |