OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_INFOBARS_INFOBAR_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_INFOBARS_INFOBAR_DELEGATE_H_ |
6 #define CHROME_BROWSER_INFOBARS_INFOBAR_DELEGATE_H_ | 6 #define CHROME_BROWSER_INFOBARS_INFOBAR_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
11 #include "webkit/glue/window_open_disposition.h" | 11 #include "webkit/glue/window_open_disposition.h" |
12 | 12 |
13 class ConfirmInfoBarDelegate; | 13 class ConfirmInfoBarDelegate; |
14 class ExtensionInfoBarDelegate; | 14 class ExtensionInfoBarDelegate; |
| 15 class GarbledTextInfoBarDelegate; |
15 class InfoBar; | 16 class InfoBar; |
16 class InfoBarTabHelper; | 17 class InfoBarTabHelper; |
17 class InsecureContentInfoBarDelegate; | 18 class InsecureContentInfoBarDelegate; |
18 class LinkInfoBarDelegate; | 19 class LinkInfoBarDelegate; |
19 class PluginInstallerInfoBarDelegate; | 20 class PluginInstallerInfoBarDelegate; |
20 class RegisterProtocolHandlerInfoBarDelegate; | 21 class RegisterProtocolHandlerInfoBarDelegate; |
21 class ThemeInstalledInfoBarDelegate; | 22 class ThemeInstalledInfoBarDelegate; |
22 class TranslateInfoBarDelegate; | 23 class TranslateInfoBarDelegate; |
23 | 24 |
24 namespace gfx { | 25 namespace gfx { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 // NULL, no icon is shown. | 80 // NULL, no icon is shown. |
80 virtual gfx::Image* GetIcon() const; | 81 virtual gfx::Image* GetIcon() const; |
81 | 82 |
82 // Returns the type of the infobar. The type determines the appearance (such | 83 // Returns the type of the infobar. The type determines the appearance (such |
83 // as background color) of the infobar. | 84 // as background color) of the infobar. |
84 virtual Type GetInfoBarType() const; | 85 virtual Type GetInfoBarType() const; |
85 | 86 |
86 // Type-checking downcast routines: | 87 // Type-checking downcast routines: |
87 virtual ConfirmInfoBarDelegate* AsConfirmInfoBarDelegate(); | 88 virtual ConfirmInfoBarDelegate* AsConfirmInfoBarDelegate(); |
88 virtual ExtensionInfoBarDelegate* AsExtensionInfoBarDelegate(); | 89 virtual ExtensionInfoBarDelegate* AsExtensionInfoBarDelegate(); |
| 90 virtual GarbledTextInfoBarDelegate* AsGarbledTextInfoBarDelegate(); |
89 virtual InsecureContentInfoBarDelegate* AsInsecureContentInfoBarDelegate(); | 91 virtual InsecureContentInfoBarDelegate* AsInsecureContentInfoBarDelegate(); |
90 virtual LinkInfoBarDelegate* AsLinkInfoBarDelegate(); | 92 virtual LinkInfoBarDelegate* AsLinkInfoBarDelegate(); |
91 virtual PluginInstallerInfoBarDelegate* AsPluginInstallerInfoBarDelegate(); | 93 virtual PluginInstallerInfoBarDelegate* AsPluginInstallerInfoBarDelegate(); |
92 virtual RegisterProtocolHandlerInfoBarDelegate* | 94 virtual RegisterProtocolHandlerInfoBarDelegate* |
93 AsRegisterProtocolHandlerInfoBarDelegate(); | 95 AsRegisterProtocolHandlerInfoBarDelegate(); |
94 virtual ThemeInstalledInfoBarDelegate* AsThemePreviewInfobarDelegate(); | 96 virtual ThemeInstalledInfoBarDelegate* AsThemePreviewInfobarDelegate(); |
95 virtual TranslateInfoBarDelegate* AsTranslateInfoBarDelegate(); | 97 virtual TranslateInfoBarDelegate* AsTranslateInfoBarDelegate(); |
96 | 98 |
97 protected: | 99 protected: |
98 // If |contents| is non-NULL, its active entry's unique ID will be stored | 100 // If |contents| is non-NULL, its active entry's unique ID will be stored |
(...skipping 18 matching lines...) Expand all Loading... |
117 // opened for. Used to help expire on navigations. | 119 // opened for. Used to help expire on navigations. |
118 int contents_unique_id_; | 120 int contents_unique_id_; |
119 | 121 |
120 // TODO(pkasting): Remove. | 122 // TODO(pkasting): Remove. |
121 InfoBarTabHelper* owner_; | 123 InfoBarTabHelper* owner_; |
122 | 124 |
123 DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate); | 125 DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate); |
124 }; | 126 }; |
125 | 127 |
126 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_DELEGATE_H_ | 128 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_DELEGATE_H_ |
OLD | NEW |