| 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/save_password_infobar.h" | 5 #include "chrome/browser/ui/android/infobars/save_password_infobar.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
| 10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 save_password_delegate->message_link_range().start(), | 39 save_password_delegate->message_link_range().start(), |
| 40 save_password_delegate->message_link_range().end(), ok_button_text.obj(), | 40 save_password_delegate->message_link_range().end(), ok_button_text.obj(), |
| 41 cancel_button_text.obj(), first_run_experience_message.obj()); | 41 cancel_button_text.obj(), first_run_experience_message.obj()); |
| 42 } | 42 } |
| 43 | 43 |
| 44 void SavePasswordInfoBar::OnLinkClicked(JNIEnv* env, | 44 void SavePasswordInfoBar::OnLinkClicked(JNIEnv* env, |
| 45 const JavaParamRef<jobject>& obj) { | 45 const JavaParamRef<jobject>& obj) { |
| 46 GetDelegate()->LinkClicked(NEW_FOREGROUND_TAB); | 46 GetDelegate()->LinkClicked(NEW_FOREGROUND_TAB); |
| 47 } | 47 } |
| 48 | 48 |
| 49 bool SavePasswordInfoBar::Register(JNIEnv* env) { | |
| 50 return RegisterNativesImpl(env); | |
| 51 } | |
| 52 | |
| 53 std::unique_ptr<infobars::InfoBar> CreateSavePasswordInfoBar( | 49 std::unique_ptr<infobars::InfoBar> CreateSavePasswordInfoBar( |
| 54 std::unique_ptr<SavePasswordInfoBarDelegate> delegate) { | 50 std::unique_ptr<SavePasswordInfoBarDelegate> delegate) { |
| 55 return base::WrapUnique(new SavePasswordInfoBar(std::move(delegate))); | 51 return base::WrapUnique(new SavePasswordInfoBar(std::move(delegate))); |
| 56 } | 52 } |
| OLD | NEW |