OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_COCOA_INFOBARS_MOCK_CONFIRM_INFOBAR_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_INFOBARS_MOCK_CONFIRM_INFOBAR_DELEGATE_H_ |
6 #define CHROME_BROWSER_UI_COCOA_INFOBARS_MOCK_CONFIRM_INFOBAR_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_COCOA_INFOBARS_MOCK_CONFIRM_INFOBAR_DELEGATE_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 bool message_text_accessed() const { return message_text_accessed_; } | 30 bool message_text_accessed() const { return message_text_accessed_; } |
31 bool link_text_accessed() const { return link_text_accessed_; } | 31 bool link_text_accessed() const { return link_text_accessed_; } |
32 bool ok_clicked() const { return ok_clicked_; } | 32 bool ok_clicked() const { return ok_clicked_; } |
33 bool cancel_clicked() const { return cancel_clicked_; } | 33 bool cancel_clicked() const { return cancel_clicked_; } |
34 bool link_clicked() const { return link_clicked_; } | 34 bool link_clicked() const { return link_clicked_; } |
35 | 35 |
36 static const char kMessage[]; | 36 static const char kMessage[]; |
37 | 37 |
38 private: | 38 private: |
39 // ConfirmInfoBarDelegate: | 39 // ConfirmInfoBarDelegate: |
| 40 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; |
40 int GetIconId() const override; | 41 int GetIconId() const override; |
41 base::string16 GetMessageText() const override; | 42 base::string16 GetMessageText() const override; |
42 base::string16 GetButtonLabel(InfoBarButton button) const override; | 43 base::string16 GetButtonLabel(InfoBarButton button) const override; |
43 bool Accept() override; | 44 bool Accept() override; |
44 bool Cancel() override; | 45 bool Cancel() override; |
45 base::string16 GetLinkText() const override; | 46 base::string16 GetLinkText() const override; |
46 bool LinkClicked(WindowOpenDisposition disposition) override; | 47 bool LinkClicked(WindowOpenDisposition disposition) override; |
47 | 48 |
48 Owner* owner_; | 49 Owner* owner_; |
49 // Determines whether the infobar closes when an action is taken or not. | 50 // Determines whether the infobar closes when an action is taken or not. |
50 bool closes_on_action_; | 51 bool closes_on_action_; |
51 mutable bool icon_accessed_; | 52 mutable bool icon_accessed_; |
52 mutable bool message_text_accessed_; | 53 mutable bool message_text_accessed_; |
53 mutable bool link_text_accessed_; | 54 mutable bool link_text_accessed_; |
54 bool ok_clicked_; | 55 bool ok_clicked_; |
55 bool cancel_clicked_; | 56 bool cancel_clicked_; |
56 bool link_clicked_; | 57 bool link_clicked_; |
57 | 58 |
58 DISALLOW_COPY_AND_ASSIGN(MockConfirmInfoBarDelegate); | 59 DISALLOW_COPY_AND_ASSIGN(MockConfirmInfoBarDelegate); |
59 }; | 60 }; |
60 | 61 |
61 #endif // CHROME_BROWSER_UI_COCOA_INFOBARS_MOCK_CONFIRM_INFOBAR_DELEGATE_H_ | 62 #endif // CHROME_BROWSER_UI_COCOA_INFOBARS_MOCK_CONFIRM_INFOBAR_DELEGATE_H_ |
OLD | NEW |