Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Side by Side Diff: chrome/browser/ui/android/infobars/auto_signin_first_run_infobar.cc

Issue 1481553002: jni: Pass method parameters as JavaParamRef in chrome/browser/ui. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698