| 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_PASSWORD_MANAGER_SAVE_PASSWORD_INFOBAR_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_SAVE_PASSWORD_INFOBAR_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_PASSWORD_MANAGER_SAVE_PASSWORD_INFOBAR_DELEGATE_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_SAVE_PASSWORD_INFOBAR_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/timer/elapsed_timer.h" | 10 #include "base/timer/elapsed_timer.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 scoped_ptr<password_manager::PasswordFormManager> form_to_save, | 40 scoped_ptr<password_manager::PasswordFormManager> form_to_save, |
| 41 const std::string& uma_histogram_suffix, | 41 const std::string& uma_histogram_suffix, |
| 42 password_manager::CredentialSourceType source_type); | 42 password_manager::CredentialSourceType source_type); |
| 43 | 43 |
| 44 ~SavePasswordInfoBarDelegate() override; | 44 ~SavePasswordInfoBarDelegate() override; |
| 45 | 45 |
| 46 // If the infobar was triggered by the Credential management API, then on | 46 // If the infobar was triggered by the Credential management API, then on |
| 47 // Android it should display the "More" button. | 47 // Android it should display the "More" button. |
| 48 bool ShouldShowMoreButton(); | 48 bool ShouldShowMoreButton(); |
| 49 | 49 |
| 50 const gfx::Range& title_link_range() const { return title_link_range_; } | |
| 51 | |
| 52 // ConfirmInfoBarDelegate: | 50 // ConfirmInfoBarDelegate: |
| 53 Type GetInfoBarType() const override; | 51 Type GetInfoBarType() const override; |
| 54 InfoBarAutomationType GetInfoBarAutomationType() const override; | 52 InfoBarAutomationType GetInfoBarAutomationType() const override; |
| 55 int GetIconID() const override; | 53 int GetIconID() const override; |
| 56 bool ShouldExpire(const NavigationDetails& details) const override; | 54 bool ShouldExpire(const NavigationDetails& details) const override; |
| 57 void InfoBarDismissed() override; | 55 void InfoBarDismissed() override; |
| 58 base::string16 GetMessageText() const override; | 56 base::string16 GetMessageText() const override; |
| 57 gfx::Range GetMessageLinkRange() const override; |
| 59 base::string16 GetButtonLabel(InfoBarButton button) const override; | 58 base::string16 GetButtonLabel(InfoBarButton button) const override; |
| 60 bool LinkClicked(WindowOpenDisposition disposition) override; | 59 bool LinkClicked(WindowOpenDisposition disposition) override; |
| 61 bool Accept() override; | 60 bool Accept() override; |
| 62 bool Cancel() override; | 61 bool Cancel() override; |
| 63 | 62 |
| 64 protected: | 63 protected: |
| 65 // Makes a ctor available in tests. | 64 // Makes a ctor available in tests. |
| 66 SavePasswordInfoBarDelegate( | 65 SavePasswordInfoBarDelegate( |
| 67 scoped_ptr<password_manager::PasswordFormManager> form_to_save, | 66 scoped_ptr<password_manager::PasswordFormManager> form_to_save, |
| 68 const std::string& uma_histogram_suffix, | 67 const std::string& uma_histogram_suffix, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 94 base::string16 title_; | 93 base::string16 title_; |
| 95 | 94 |
| 96 // If set, describes the location of the link to the help center article for | 95 // If set, describes the location of the link to the help center article for |
| 97 // Smart Lock. | 96 // Smart Lock. |
| 98 gfx::Range title_link_range_; | 97 gfx::Range title_link_range_; |
| 99 | 98 |
| 100 DISALLOW_COPY_AND_ASSIGN(SavePasswordInfoBarDelegate); | 99 DISALLOW_COPY_AND_ASSIGN(SavePasswordInfoBarDelegate); |
| 101 }; | 100 }; |
| 102 | 101 |
| 103 #endif // CHROME_BROWSER_PASSWORD_MANAGER_SAVE_PASSWORD_INFOBAR_DELEGATE_H_ | 102 #endif // CHROME_BROWSER_PASSWORD_MANAGER_SAVE_PASSWORD_INFOBAR_DELEGATE_H_ |
| OLD | NEW |