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_GTK_INFOBARS_EXTENSION_INFOBAR_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_INFOBARS_EXTENSION_INFOBAR_GTK_H_ |
6 #define CHROME_BROWSER_UI_GTK_INFOBARS_EXTENSION_INFOBAR_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_INFOBARS_EXTENSION_INFOBAR_GTK_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "chrome/browser/extensions/extension_infobar_delegate.h" | 9 #include "chrome/browser/extensions/extension_infobar_delegate.h" |
10 #include "chrome/browser/ui/gtk/extensions/extension_view_gtk.h" | 10 #include "chrome/browser/ui/gtk/extensions/extension_view_gtk.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 virtual ~ExtensionInfoBarGtk(); | 25 virtual ~ExtensionInfoBarGtk(); |
26 | 26 |
27 // Overridden from InfoBar (through InfoBarGtk): | 27 // Overridden from InfoBar (through InfoBarGtk): |
28 virtual void PlatformSpecificHide(bool animate) OVERRIDE; | 28 virtual void PlatformSpecificHide(bool animate) OVERRIDE; |
29 | 29 |
30 // Overridden from InfoBarGtk: | 30 // Overridden from InfoBarGtk: |
31 virtual void GetTopColor(InfoBarDelegate::Type type, | 31 virtual void GetTopColor(InfoBarDelegate::Type type, |
32 double* r, double* g, double* b) OVERRIDE; | 32 double* r, double* g, double* b) OVERRIDE; |
33 virtual void GetBottomColor(InfoBarDelegate::Type type, | 33 virtual void GetBottomColor(InfoBarDelegate::Type type, |
34 double* r, double* g, double* b) OVERRIDE; | 34 double* r, double* g, double* b) OVERRIDE; |
| 35 virtual void InitWidgets() OVERRIDE; |
35 | 36 |
36 // Overridden from MenuGtk::Delegate: | 37 // Overridden from MenuGtk::Delegate: |
37 virtual void StoppedShowing() OVERRIDE; | 38 virtual void StoppedShowing() OVERRIDE; |
38 | 39 |
39 // Overridden from ExtensionInfoBarDelegate::DelegateObserver: | 40 // Overridden from ExtensionInfoBarDelegate::DelegateObserver: |
40 virtual void OnDelegateDeleted() OVERRIDE; | 41 virtual void OnDelegateDeleted() OVERRIDE; |
41 | 42 |
42 private: | 43 private: |
43 // Build the widgets of the Infobar. | |
44 void BuildWidgets(); | |
45 | |
46 void OnImageLoaded(const gfx::Image& image); | 44 void OnImageLoaded(const gfx::Image& image); |
47 | 45 |
48 // Looks at the window the infobar is in and gets the browser. Can return | 46 // Looks at the window the infobar is in and gets the browser. Can return |
49 // NULL if we aren't attached. | 47 // NULL if we aren't attached. |
50 Browser* GetBrowser(); | 48 Browser* GetBrowser(); |
51 | 49 |
52 // Returns the context menu model for this extension. Can be NULL if | 50 // Returns the context menu model for this extension. Can be NULL if |
53 // extension context menus are disabled. | 51 // extension context menus are disabled. |
54 ExtensionContextMenuModel* BuildMenuModel(); | 52 ExtensionContextMenuModel* BuildMenuModel(); |
55 | 53 |
(...skipping 28 matching lines...) Expand all Loading... |
84 | 82 |
85 // The model for the current menu displayed. | 83 // The model for the current menu displayed. |
86 scoped_refptr<ExtensionContextMenuModel> context_menu_model_; | 84 scoped_refptr<ExtensionContextMenuModel> context_menu_model_; |
87 | 85 |
88 base::WeakPtrFactory<ExtensionInfoBarGtk> weak_ptr_factory_; | 86 base::WeakPtrFactory<ExtensionInfoBarGtk> weak_ptr_factory_; |
89 | 87 |
90 DISALLOW_COPY_AND_ASSIGN(ExtensionInfoBarGtk); | 88 DISALLOW_COPY_AND_ASSIGN(ExtensionInfoBarGtk); |
91 }; | 89 }; |
92 | 90 |
93 #endif // CHROME_BROWSER_UI_GTK_INFOBARS_EXTENSION_INFOBAR_GTK_H_ | 91 #endif // CHROME_BROWSER_UI_GTK_INFOBARS_EXTENSION_INFOBAR_GTK_H_ |
OLD | NEW |