OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_GTK_EXTENSION_INFOBAR_GTK_H_ |
| 6 #define CHROME_BROWSER_GTK_EXTENSION_INFOBAR_GTK_H_ |
| 7 |
| 8 #include <gtk/gtk.h> |
| 9 |
| 10 #include "chrome/browser/gtk/infobar_gtk.h" |
| 11 #include "chrome/browser/extensions/extension_infobar_delegate.h" |
| 12 #include "chrome/browser/extensions/image_loading_tracker.h" |
| 13 #include "gfx/gtk_util.h" |
| 14 |
| 15 class ExtensionInfobarDelegate; |
| 16 class ExtensionResource; |
| 17 class ExtensionViewGtk; |
| 18 |
| 19 class ExtensionInfoBarGtk : public InfoBar, |
| 20 public ImageLoadingTracker::Observer { |
| 21 public: |
| 22 explicit ExtensionInfoBarGtk(ExtensionInfoBarDelegate* delegate); |
| 23 virtual ~ExtensionInfoBarGtk(); |
| 24 |
| 25 // Overridden from ImageLoadingTracker::Observer: |
| 26 virtual void OnImageLoaded( |
| 27 SkBitmap* image, ExtensionResource resource, int index); |
| 28 |
| 29 private: |
| 30 // Build the widgets of the Infobar. |
| 31 void BuildWidgets(); |
| 32 |
| 33 CHROMEGTK_CALLBACK_1(ExtensionInfoBarGtk, void, OnSizeAllocate, |
| 34 GtkAllocation*); |
| 35 |
| 36 ImageLoadingTracker tracker_; |
| 37 |
| 38 ExtensionInfoBarDelegate* delegate_; |
| 39 |
| 40 ExtensionViewGtk* view_; |
| 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(ExtensionInfoBarGtk); |
| 43 }; |
| 44 |
| 45 #endif // CHROME_BROWSER_GTK_EXTENSION_INFOBAR_GTK_H_ |
OLD | NEW |