1 // Copyright 2014 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 #ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_SAVE_PASSWORD_INFOBAR_H_ 6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_SAVE_PASSWORD_INFOBAR_H_ 7 8 #include "base/basictypes.h" 9 #include "base/strings/string16.h" 10 #include "chrome/browser/password_manager/save_password_infobar_delegate.h" 11 #include "chrome/browser/ui/android/infobars/confirm_infobar.h" 12 13 // InfoBar implementation for saving passwords to be used for autofill. 14 class SavePasswordInfoBar : public ConfirmInfoBar { 15 public: 16 explicit SavePasswordInfoBar( 17 scoped_ptr<SavePasswordInfoBarDelegate> delegate); 18 virtual ~SavePasswordInfoBar(); 19 20 void SetUseAdditionalAuthentication(JNIEnv* env, 21 jobject obj, 22 bool use_additional_authentication); 23 24 private: 25 // ConfirmInfoBar: 26 virtual base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( 27 JNIEnv* env) OVERRIDE; 28 29 SavePasswordInfoBarDelegate* GetDelegate(); 30 31 base::android::ScopedJavaGlobalRef<jobject> java_save_password_delegate_; 32 33 DISALLOW_COPY_AND_ASSIGN(SavePasswordInfoBar); 34 }; 35 36 // Registers native methods. 37 bool RegisterSavePasswordInfoBar(JNIEnv* env); 38 39 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_SAVE_PASSWORD_INFOBAR_H_ 40