OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_INFOBAR_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_INFOBAR_DELEGATE_H_ |
| 7 |
| 8 #include "components/infobars/core/confirm_infobar_delegate.h" |
| 9 #include "ui/gfx/range/range.h" |
| 10 |
| 11 // Base class for some of the password manager infobar delegates, e.g. |
| 12 // SavePasswordInfoBarDelegate. |
| 13 class PasswordManagerInfoBarDelegate : public ConfirmInfoBarDelegate { |
| 14 public: |
| 15 ~PasswordManagerInfoBarDelegate() override; |
| 16 |
| 17 const gfx::Range& message_link_range() const { return message_link_range_; } |
| 18 |
| 19 // ConfirmInfoBarDelegate: |
| 20 Type GetInfoBarType() const override; |
| 21 InfoBarAutomationType GetInfoBarAutomationType() const override; |
| 22 int GetIconId() const override; |
| 23 bool ShouldExpire(const NavigationDetails& details) const override; |
| 24 base::string16 GetMessageText() const override; |
| 25 bool LinkClicked(WindowOpenDisposition disposition) override; |
| 26 |
| 27 protected: |
| 28 PasswordManagerInfoBarDelegate(); |
| 29 |
| 30 void SetMessage(const base::string16& message); |
| 31 void SetMessageLinkRange(const gfx::Range& message_link_range); |
| 32 |
| 33 private: |
| 34 // Message for the infobar: branded as a part of Google Smart Lock for signed |
| 35 // users. |
| 36 base::string16 message_; |
| 37 |
| 38 // If set, describes the location of the link to the help center article for |
| 39 // Smart Lock. |
| 40 gfx::Range message_link_range_; |
| 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(PasswordManagerInfoBarDelegate); |
| 43 }; |
| 44 |
| 45 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_INFOBAR_DELEGATE_H_ |
OLD | NEW |