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