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_INFOBAR_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_INFOBARS_INFOBAR_GTK_H_ |
6 #define CHROME_BROWSER_UI_GTK_INFOBARS_INFOBAR_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_INFOBARS_INFOBAR_GTK_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "chrome/browser/tab_contents/infobar_delegate.h" | 13 #include "chrome/browser/tab_contents/infobar_delegate.h" |
14 #include "chrome/browser/tab_contents/infobar.h" | 14 #include "chrome/browser/tab_contents/infobar.h" |
15 #include "chrome/browser/ui/gtk/owned_widget_gtk.h" | 15 #include "chrome/browser/ui/gtk/owned_widget_gtk.h" |
16 #include "content/common/notification_observer.h" | 16 #include "content/common/notification_observer.h" |
17 #include "content/common/notification_registrar.h" | 17 #include "content/common/notification_registrar.h" |
18 #include "third_party/skia/include/core/SkPaint.h" | 18 #include "third_party/skia/include/core/SkPaint.h" |
19 #include "ui/base/gtk/gtk_signal.h" | 19 #include "ui/base/gtk/gtk_signal.h" |
20 | 20 |
21 class CustomDrawButton; | 21 class CustomDrawButton; |
22 class GtkThemeService; | 22 class GtkThemeService; |
23 class InfoBarDelegate; | 23 class InfoBarDelegate; |
24 | 24 |
25 class InfoBarGtk : public InfoBar, | 25 class InfoBarGtk : public InfoBar, |
26 public NotificationObserver { | 26 public NotificationObserver { |
27 public: | 27 public: |
28 explicit InfoBarGtk(TabContentsWrapper* owner, InfoBarDelegate* delegate); | 28 InfoBarGtk(TabContentsWrapper* owner, InfoBarDelegate* delegate); |
29 virtual ~InfoBarGtk(); | 29 virtual ~InfoBarGtk(); |
30 | 30 |
31 // Get the top level native GTK widget for this infobar. | 31 // Get the top level native GTK widget for this infobar. |
32 GtkWidget* widget(); | 32 GtkWidget* widget(); |
33 | 33 |
34 GdkColor GetBorderColor() const; | 34 GdkColor GetBorderColor() const; |
35 | 35 |
36 // Returns the target height of the infobar if the bar is animating, | 36 // Returns the target height of the infobar if the bar is animating, |
37 // otherwise 0. We care about this number since we want to prevent | 37 // otherwise 0. We care about this number since we want to prevent |
38 // unnecessary renderer repaints while animating. | 38 // unnecessary renderer repaints while animating. |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 void UpdateBorderColor(); | 105 void UpdateBorderColor(); |
106 | 106 |
107 // A GtkExpandedContainer that contains |bg_box_| so we can varry the height | 107 // A GtkExpandedContainer that contains |bg_box_| so we can varry the height |
108 // of the infobar. | 108 // of the infobar. |
109 OwnedWidgetGtk widget_; | 109 OwnedWidgetGtk widget_; |
110 | 110 |
111 DISALLOW_COPY_AND_ASSIGN(InfoBarGtk); | 111 DISALLOW_COPY_AND_ASSIGN(InfoBarGtk); |
112 }; | 112 }; |
113 | 113 |
114 #endif // CHROME_BROWSER_UI_GTK_INFOBARS_INFOBAR_GTK_H_ | 114 #endif // CHROME_BROWSER_UI_GTK_INFOBARS_INFOBAR_GTK_H_ |
OLD | NEW |