OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_TAB_CONTENTS_INFOBAR_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_INFOBAR_DELEGATE_H_ |
6 #define CHROME_BROWSER_TAB_CONTENTS_INFOBAR_DELEGATE_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_INFOBAR_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "chrome/browser/tab_contents/navigation_controller.h" | 11 #include "chrome/browser/tab_contents/navigation_controller.h" |
12 #include "webkit/glue/window_open_disposition.h" | 12 #include "webkit/glue/window_open_disposition.h" |
13 | 13 |
14 class AlertInfoBarDelegate; | 14 class AlertInfoBarDelegate; |
15 class ConfirmInfoBarDelegate; | 15 class ConfirmInfoBarDelegate; |
16 class CrashedExtensionInfoBarDelegate; | 16 class CrashedExtensionInfoBarDelegate; |
17 class ExtensionInfoBarDelegate; | 17 class ExtensionInfoBarDelegate; |
18 class TranslateInfoBarDelegate; | 18 class TranslateInfoBarDelegate; |
| 19 class TranslateInfoBarDelegate2; |
19 class InfoBar; | 20 class InfoBar; |
20 class LinkInfoBarDelegate; | 21 class LinkInfoBarDelegate; |
21 class SkBitmap; | 22 class SkBitmap; |
22 class ThemeInstalledInfoBarDelegate; | 23 class ThemeInstalledInfoBarDelegate; |
23 | 24 |
24 // An interface implemented by objects wishing to control an InfoBar. | 25 // An interface implemented by objects wishing to control an InfoBar. |
25 // Implementing this interface is not sufficient to use an InfoBar, since it | 26 // Implementing this interface is not sufficient to use an InfoBar, since it |
26 // does not map to a specific InfoBar type. Instead, you must implement either | 27 // does not map to a specific InfoBar type. Instead, you must implement either |
27 // AlertInfoBarDelegate or ConfirmInfoBarDelegate, or override with your own | 28 // AlertInfoBarDelegate or ConfirmInfoBarDelegate, or override with your own |
28 // delegate for your own InfoBar variety. | 29 // delegate for your own InfoBar variety. |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 // implemented. | 105 // implemented. |
105 virtual ThemeInstalledInfoBarDelegate* AsThemePreviewInfobarDelegate() { | 106 virtual ThemeInstalledInfoBarDelegate* AsThemePreviewInfobarDelegate() { |
106 return NULL; | 107 return NULL; |
107 } | 108 } |
108 | 109 |
109 // Returns a pointer to the TranslateInfoBarDelegate interface, if | 110 // Returns a pointer to the TranslateInfoBarDelegate interface, if |
110 // implemented. | 111 // implemented. |
111 virtual TranslateInfoBarDelegate* AsTranslateInfoBarDelegate() { | 112 virtual TranslateInfoBarDelegate* AsTranslateInfoBarDelegate() { |
112 return NULL; | 113 return NULL; |
113 } | 114 } |
| 115 virtual TranslateInfoBarDelegate2* AsTranslateInfoBarDelegate2() { |
| 116 return NULL; |
| 117 } |
114 | 118 |
115 // Returns a pointer to the ExtensionInfoBarDelegate interface, if | 119 // Returns a pointer to the ExtensionInfoBarDelegate interface, if |
116 // implemented. | 120 // implemented. |
117 virtual ExtensionInfoBarDelegate* AsExtensionInfoBarDelegate() { | 121 virtual ExtensionInfoBarDelegate* AsExtensionInfoBarDelegate() { |
118 return NULL; | 122 return NULL; |
119 } | 123 } |
120 | 124 |
121 // Returns a pointer to the CrashedExtensionInfoBarDelegate interface, if | 125 // Returns a pointer to the CrashedExtensionInfoBarDelegate interface, if |
122 // implemented. | 126 // implemented. |
123 virtual CrashedExtensionInfoBarDelegate* AsCrashedExtensionInfoBarDelegate() { | 127 virtual CrashedExtensionInfoBarDelegate* AsCrashedExtensionInfoBarDelegate() { |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 | 295 |
292 private: | 296 private: |
293 std::wstring message_; | 297 std::wstring message_; |
294 SkBitmap* icon_; | 298 SkBitmap* icon_; |
295 bool auto_expire_; // Should it expire automatically on navigation? | 299 bool auto_expire_; // Should it expire automatically on navigation? |
296 | 300 |
297 DISALLOW_COPY_AND_ASSIGN(SimpleAlertInfoBarDelegate); | 301 DISALLOW_COPY_AND_ASSIGN(SimpleAlertInfoBarDelegate); |
298 }; | 302 }; |
299 | 303 |
300 #endif // CHROME_BROWSER_TAB_CONTENTS_INFOBAR_DELEGATE_H_ | 304 #endif // CHROME_BROWSER_TAB_CONTENTS_INFOBAR_DELEGATE_H_ |
OLD | NEW |