| 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 #ifndef IOS_CHROME_BROWSER_PASSWORDS_IOS_CHROME_SAVE_PASSWORD_INFOBAR_DELEGATE_H
_ | 5 #ifndef IOS_CHROME_BROWSER_PASSWORDS_IOS_CHROME_SAVE_PASSWORD_INFOBAR_DELEGATE_H
_ |
| 6 #define IOS_CHROME_BROWSER_PASSWORDS_IOS_CHROME_SAVE_PASSWORD_INFOBAR_DELEGATE_H
_ | 6 #define IOS_CHROME_BROWSER_PASSWORDS_IOS_CHROME_SAVE_PASSWORD_INFOBAR_DELEGATE_H
_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // IOSChromeSavePasswordInfoBarDelegate while the user makes up their mind | 23 // IOSChromeSavePasswordInfoBarDelegate while the user makes up their mind |
| 24 // with the "save password" infobar. | 24 // with the "save password" infobar. |
| 25 class IOSChromeSavePasswordInfoBarDelegate | 25 class IOSChromeSavePasswordInfoBarDelegate |
| 26 : public IOSChromePasswordManagerInfoBarDelegate { | 26 : public IOSChromePasswordManagerInfoBarDelegate { |
| 27 public: | 27 public: |
| 28 // Creates the infobar for |form_to_save| and adds it to |infobar_manager|. | 28 // Creates the infobar for |form_to_save| and adds it to |infobar_manager|. |
| 29 // |is_smart_lock_enabled| controls the branding string. | 29 // |is_smart_lock_enabled| controls the branding string. |
| 30 static void Create( | 30 static void Create( |
| 31 bool is_smart_lock_branding_enabled, | 31 bool is_smart_lock_branding_enabled, |
| 32 infobars::InfoBarManager* infobar_manager, | 32 infobars::InfoBarManager* infobar_manager, |
| 33 std::unique_ptr<password_manager::PasswordFormManager> form_to_save); | 33 scoped_refptr<password_manager::PasswordFormManager> form_to_save); |
| 34 | 34 |
| 35 ~IOSChromeSavePasswordInfoBarDelegate() override; | 35 ~IOSChromeSavePasswordInfoBarDelegate() override; |
| 36 | 36 |
| 37 private: | 37 private: |
| 38 IOSChromeSavePasswordInfoBarDelegate( | 38 IOSChromeSavePasswordInfoBarDelegate( |
| 39 bool is_smart_lock_branding_enabled, | 39 bool is_smart_lock_branding_enabled, |
| 40 std::unique_ptr<password_manager::PasswordFormManager> form_to_save); | 40 scoped_refptr<password_manager::PasswordFormManager> form_to_save); |
| 41 | 41 |
| 42 // ConfirmInfoBarDelegate implementation. | 42 // ConfirmInfoBarDelegate implementation. |
| 43 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; | 43 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; |
| 44 base::string16 GetMessageText() const override; | 44 base::string16 GetMessageText() const override; |
| 45 base::string16 GetButtonLabel(InfoBarButton button) const override; | 45 base::string16 GetButtonLabel(InfoBarButton button) const override; |
| 46 bool Accept() override; | 46 bool Accept() override; |
| 47 bool Cancel() override; | 47 bool Cancel() override; |
| 48 | 48 |
| 49 DISALLOW_COPY_AND_ASSIGN(IOSChromeSavePasswordInfoBarDelegate); | 49 DISALLOW_COPY_AND_ASSIGN(IOSChromeSavePasswordInfoBarDelegate); |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 #endif // IOS_CHROME_BROWSER_PASSWORDS_IOS_CHROME_SAVE_PASSWORD_INFOBAR_DELEGAT
E_H_ | 52 #endif // IOS_CHROME_BROWSER_PASSWORDS_IOS_CHROME_SAVE_PASSWORD_INFOBAR_DELEGAT
E_H_ |
| OLD | NEW |