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_API_INFOBARS_LINK_INFOBAR_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_API_INFOBARS_LINK_INFOBAR_DELEGATE_H_ |
6 #define CHROME_BROWSER_API_INFOBARS_LINK_INFOBAR_DELEGATE_H_ | 6 #define CHROME_BROWSER_API_INFOBARS_LINK_INFOBAR_DELEGATE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 virtual string16 GetLinkText() const = 0; | 24 virtual string16 GetLinkText() const = 0; |
25 | 25 |
26 // Called when the Link is clicked. The |disposition| specifies how the | 26 // Called when the Link is clicked. The |disposition| specifies how the |
27 // resulting document should be loaded (based on the event flags present when | 27 // resulting document should be loaded (based on the event flags present when |
28 // the link was clicked). If this function returns true, the infobar is then | 28 // the link was clicked). If this function returns true, the infobar is then |
29 // immediately closed. Subclasses MUST NOT return true if in handling this | 29 // immediately closed. Subclasses MUST NOT return true if in handling this |
30 // call something triggers the infobar to begin closing. | 30 // call something triggers the infobar to begin closing. |
31 virtual bool LinkClicked(WindowOpenDisposition disposition); | 31 virtual bool LinkClicked(WindowOpenDisposition disposition); |
32 | 32 |
33 protected: | 33 protected: |
34 explicit LinkInfoBarDelegate(InfoBarTabHelper* infobar_helper); | 34 explicit LinkInfoBarDelegate(InfoBarTabService* infobar_service); |
35 virtual ~LinkInfoBarDelegate(); | 35 virtual ~LinkInfoBarDelegate(); |
36 | 36 |
37 private: | 37 private: |
38 // InfoBarDelegate: | 38 // InfoBarDelegate: |
39 virtual InfoBar* CreateInfoBar(InfoBarTabHelper* infobar_helper) OVERRIDE; | 39 virtual InfoBar* CreateInfoBar(InfoBarTabService* infobar_service) OVERRIDE; |
40 virtual LinkInfoBarDelegate* AsLinkInfoBarDelegate() OVERRIDE; | 40 virtual LinkInfoBarDelegate* AsLinkInfoBarDelegate() OVERRIDE; |
41 | 41 |
42 DISALLOW_COPY_AND_ASSIGN(LinkInfoBarDelegate); | 42 DISALLOW_COPY_AND_ASSIGN(LinkInfoBarDelegate); |
43 }; | 43 }; |
44 | 44 |
45 #endif // CHROME_BROWSER_API_INFOBARS_LINK_INFOBAR_DELEGATE_H_ | 45 #endif // CHROME_BROWSER_API_INFOBARS_LINK_INFOBAR_DELEGATE_H_ |
46 | 46 |
OLD | NEW |