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