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 "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 InfoBarDelegate* delegate() const { return delegate_; } | 32 InfoBarDelegate* delegate() const { return delegate_; } |
33 | 33 |
34 // Get the top level native GTK widget for this infobar. | 34 // Get the top level native GTK widget for this infobar. |
35 GtkWidget* widget(); | 35 GtkWidget* widget(); |
36 | 36 |
37 // Set a link to the parent InfoBarContainer. This must be set before the | 37 // Set a link to the parent InfoBarContainer. This must be set before the |
38 // InfoBar is added to the view hierarchy. | 38 // InfoBar is added to the view hierarchy. |
39 void set_container(InfoBarContainerGtk* container) { container_ = container; } | 39 void set_container(InfoBarContainerGtk* container) { container_ = container; } |
40 | 40 |
41 // Starts animating the InfoBar open. | 41 // Makes the infobar visible. If |animate| is true, the infobar is then |
42 void AnimateOpen(); | 42 // animated to full size. |
43 | 43 void Show(bool animate); |
44 // Opens the InfoBar immediately. | |
45 void Open(); | |
46 | 44 |
47 // Starts animating the InfoBar closed. It will not be closed until the | 45 // Starts animating the InfoBar closed. It will not be closed until the |
48 // animation has completed, when |Close| will be called. | 46 // animation has completed, when |Close| will be called. |
49 void AnimateClose(); | 47 void AnimateClose(); |
50 | 48 |
51 // Closes the InfoBar immediately and removes it from its container. Notifies | 49 // Closes the InfoBar immediately and removes it from its container. Notifies |
52 // the delegate that it has closed. The InfoBar is deleted after this function | 50 // the delegate that it has closed. The InfoBar is deleted after this function |
53 // is called. | 51 // is called. |
54 void Close(); | 52 void Close(); |
55 | 53 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 private: | 133 private: |
136 CHROMEGTK_CALLBACK_0(InfoBar, void, OnCloseButton); | 134 CHROMEGTK_CALLBACK_0(InfoBar, void, OnCloseButton); |
137 CHROMEGTK_CALLBACK_1(InfoBar, gboolean, OnBackgroundExpose, GdkEventExpose*); | 135 CHROMEGTK_CALLBACK_1(InfoBar, gboolean, OnBackgroundExpose, GdkEventExpose*); |
138 | 136 |
139 void UpdateBorderColor(); | 137 void UpdateBorderColor(); |
140 | 138 |
141 DISALLOW_COPY_AND_ASSIGN(InfoBar); | 139 DISALLOW_COPY_AND_ASSIGN(InfoBar); |
142 }; | 140 }; |
143 | 141 |
144 #endif // CHROME_BROWSER_UI_GTK_INFOBARS_INFOBAR_GTK_H_ | 142 #endif // CHROME_BROWSER_UI_GTK_INFOBARS_INFOBAR_GTK_H_ |
OLD | NEW |