| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/android/infobars/auto_signin_first_run_infobar.h" | 5 #include "chrome/browser/ui/android/infobars/auto_signin_first_run_infobar.h" |
| 6 | 6 |
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "base/android/jni_array.h" | 8 #include "base/android/jni_array.h" |
| 9 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" |
| 10 #include "components/password_manager/core/common/credential_manager_types.h" | 10 #include "components/password_manager/core/common/credential_manager_types.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 env, auto_signin_infobar_delegate->GetExplanation()); | 30 env, auto_signin_infobar_delegate->GetExplanation()); |
| 31 ScopedJavaLocalRef<jstring> message_text = ConvertUTF16ToJavaString( | 31 ScopedJavaLocalRef<jstring> message_text = ConvertUTF16ToJavaString( |
| 32 env, auto_signin_infobar_delegate->GetMessageText()); | 32 env, auto_signin_infobar_delegate->GetMessageText()); |
| 33 | 33 |
| 34 return Java_AutoSigninFirstRunInfoBar_show( | 34 return Java_AutoSigninFirstRunInfoBar_show( |
| 35 env, message_text.obj(), ok_button_text.obj(), explanation_text.obj(), | 35 env, message_text.obj(), ok_button_text.obj(), explanation_text.obj(), |
| 36 auto_signin_infobar_delegate->message_link_range().start(), | 36 auto_signin_infobar_delegate->message_link_range().start(), |
| 37 auto_signin_infobar_delegate->message_link_range().end()); | 37 auto_signin_infobar_delegate->message_link_range().end()); |
| 38 } | 38 } |
| 39 | 39 |
| 40 void AutoSigninFirstRunInfoBar::OnLinkClicked(JNIEnv* env, jobject obj) { | 40 void AutoSigninFirstRunInfoBar::OnLinkClicked( |
| 41 JNIEnv* env, |
| 42 const JavaParamRef<jobject>& obj) { |
| 41 GetDelegate()->LinkClicked(NEW_FOREGROUND_TAB); | 43 GetDelegate()->LinkClicked(NEW_FOREGROUND_TAB); |
| 42 } | 44 } |
| 43 | 45 |
| 44 bool AutoSigninFirstRunInfoBar::Register(JNIEnv* env) { | 46 bool AutoSigninFirstRunInfoBar::Register(JNIEnv* env) { |
| 45 return RegisterNativesImpl(env); | 47 return RegisterNativesImpl(env); |
| 46 } | 48 } |
| 47 | 49 |
| 48 scoped_ptr<infobars::InfoBar> CreateAutoSigninFirstRunInfoBar( | 50 scoped_ptr<infobars::InfoBar> CreateAutoSigninFirstRunInfoBar( |
| 49 scoped_ptr<AutoSigninFirstRunInfoBarDelegate> delegate) { | 51 scoped_ptr<AutoSigninFirstRunInfoBarDelegate> delegate) { |
| 50 return make_scoped_ptr(new AutoSigninFirstRunInfoBar(delegate.Pass())); | 52 return make_scoped_ptr(new AutoSigninFirstRunInfoBar(delegate.Pass())); |
| 51 } | 53 } |
| OLD | NEW |