| 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/extensions/image_loading_tracker.h" | 10 #include "chrome/browser/extensions/image_loading_tracker.h" |
| 11 #include "chrome/browser/ui/gtk/extensions/extension_view_gtk.h" | |
| 12 #include "chrome/browser/ui/gtk/infobars/infobar_gtk.h" | 11 #include "chrome/browser/ui/gtk/infobars/infobar_gtk.h" |
| 13 #include "chrome/browser/ui/gtk/menu_gtk.h" | 12 #include "chrome/browser/ui/gtk/menu_gtk.h" |
| 14 #include "ui/gfx/gtk_util.h" | 13 #include "ui/gfx/gtk_util.h" |
| 15 | 14 |
| 16 class ExtensionResource; | 15 class ExtensionResource; |
| 17 class ExtensionViewGtk; | 16 class ExtensionView; |
| 18 class MenuGtk; | 17 class MenuGtk; |
| 19 | 18 |
| 20 class ExtensionInfoBarGtk : public InfoBarGtk, | 19 class ExtensionInfoBarGtk : public InfoBarGtk, |
| 21 public ImageLoadingTracker::Observer, | 20 public ImageLoadingTracker::Observer, |
| 22 public MenuGtk::Delegate { | 21 public MenuGtk::Delegate { |
| 23 public: | 22 public: |
| 24 ExtensionInfoBarGtk(InfoBarTabHelper* owner, | 23 ExtensionInfoBarGtk(InfoBarTabHelper* owner, |
| 25 ExtensionInfoBarDelegate* delegate); | 24 ExtensionInfoBarDelegate* delegate); |
| 26 virtual ~ExtensionInfoBarGtk(); | 25 virtual ~ExtensionInfoBarGtk(); |
| 27 | 26 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 CHROMEGTK_CALLBACK_1(ExtensionInfoBarGtk, gboolean, OnButtonPress, | 59 CHROMEGTK_CALLBACK_1(ExtensionInfoBarGtk, gboolean, OnButtonPress, |
| 61 GdkEventButton*); | 60 GdkEventButton*); |
| 62 | 61 |
| 63 CHROMEGTK_CALLBACK_1(ExtensionInfoBarGtk, gboolean, OnExpose, | 62 CHROMEGTK_CALLBACK_1(ExtensionInfoBarGtk, gboolean, OnExpose, |
| 64 GdkEventExpose*); | 63 GdkEventExpose*); |
| 65 | 64 |
| 66 ImageLoadingTracker tracker_; | 65 ImageLoadingTracker tracker_; |
| 67 | 66 |
| 68 ExtensionInfoBarDelegate* delegate_; | 67 ExtensionInfoBarDelegate* delegate_; |
| 69 | 68 |
| 70 ExtensionViewGtk* view_; | 69 ExtensionView* view_; |
| 71 | 70 |
| 72 // The button that activates the extension popup menu. Parent of |icon_|. | 71 // The button that activates the extension popup menu. Parent of |icon_|. |
| 73 GtkWidget* button_; | 72 GtkWidget* button_; |
| 74 | 73 |
| 75 // The GtkImage that is inside of |button_|, composed in OnImageLoaded(). | 74 // The GtkImage that is inside of |button_|, composed in OnImageLoaded(). |
| 76 GtkWidget* icon_; | 75 GtkWidget* icon_; |
| 77 | 76 |
| 78 // An alignment with one pixel of bottom padding. This is set so the |view_| | 77 // An alignment with one pixel of bottom padding. This is set so the |view_| |
| 79 // doesn't overlap the bottom separator. This also makes it more convenient | 78 // doesn't overlap the bottom separator. This also makes it more convenient |
| 80 // to reattach the view since the alignment_ will have the |hbox_| packing | 79 // to reattach the view since the alignment_ will have the |hbox_| packing |
| 81 // child properties. Reparenting becomes easier too. | 80 // child properties. Reparenting becomes easier too. |
| 82 GtkWidget* alignment_; | 81 GtkWidget* alignment_; |
| 83 | 82 |
| 84 DISALLOW_COPY_AND_ASSIGN(ExtensionInfoBarGtk); | 83 DISALLOW_COPY_AND_ASSIGN(ExtensionInfoBarGtk); |
| 85 }; | 84 }; |
| 86 | 85 |
| 87 #endif // CHROME_BROWSER_UI_GTK_INFOBARS_EXTENSION_INFOBAR_GTK_H_ | 86 #endif // CHROME_BROWSER_UI_GTK_INFOBARS_EXTENSION_INFOBAR_GTK_H_ |
| OLD | NEW |