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