Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Side by Side Diff: chrome/browser/ui/gtk/infobars/infobar_gtk.h

Issue 6932002: gtk/infobars: Refactor AnimateOpen/Open into a single Show() method. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/infobars/infobar_container_gtk.cc ('k') | chrome/browser/ui/gtk/infobars/infobar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698