OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_VIEWS_INFO_BAR_VIEW_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_INFO_BAR_VIEW_H_ |
6 #define CHROME_BROWSER_VIEWS_INFO_BAR_VIEW_H_ | 6 #define CHROME_BROWSER_VIEWS_INFO_BAR_VIEW_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "chrome/common/notification_service.h" | 10 #include "chrome/common/notification_service.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 explicit InfoBarView(WebContents* web_contents); | 23 explicit InfoBarView(WebContents* web_contents); |
24 | 24 |
25 virtual ~InfoBarView(); | 25 virtual ~InfoBarView(); |
26 | 26 |
27 // Adds view as a child. Views adding using AddChildView() are automatically | 27 // Adds view as a child. Views adding using AddChildView() are automatically |
28 // removed after 1 navigation, which is also the behavior if you set | 28 // removed after 1 navigation, which is also the behavior if you set |
29 // |auto_expire| to true here. You mainly need this function if you want to | 29 // |auto_expire| to true here. You mainly need this function if you want to |
30 // add an infobar that should not expire. | 30 // add an infobar that should not expire. |
31 void AppendInfoBarItem(ChromeViews::View* view, bool auto_expire); | 31 void AppendInfoBarItem(ChromeViews::View* view, bool auto_expire); |
32 | 32 |
33 virtual void GetPreferredSize(CSize *out); | 33 virtual gfx::Size GetPreferredSize(); |
34 | 34 |
35 virtual void Layout(); | 35 virtual void Layout(); |
36 | 36 |
37 // API to allow infobar children to notify us of size changes. | 37 // API to allow infobar children to notify us of size changes. |
38 virtual void ChildAnimationProgressed(); | 38 virtual void ChildAnimationProgressed(); |
39 virtual void ChildAnimationEnded(); | 39 virtual void ChildAnimationEnded(); |
40 | 40 |
41 // Invokes the following methods to do painting: | 41 // Invokes the following methods to do painting: |
42 // PaintBackground, PaintBorder and PaintSeparators. | 42 // PaintBackground, PaintBorder and PaintSeparators. |
43 virtual void Paint(ChromeCanvas* canvas); | 43 virtual void Paint(ChromeCanvas* canvas); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 79 |
80 // Map from view to number of navigations before it is removed. If a child | 80 // Map from view to number of navigations before it is removed. If a child |
81 // doesn't have an entry in here, it is NOT removed on navigations. | 81 // doesn't have an entry in here, it is NOT removed on navigations. |
82 std::map<View*,int> expire_map_; | 82 std::map<View*,int> expire_map_; |
83 | 83 |
84 DISALLOW_COPY_AND_ASSIGN(InfoBarView); | 84 DISALLOW_COPY_AND_ASSIGN(InfoBarView); |
85 }; | 85 }; |
86 | 86 |
87 #endif // CHROME_BROWSER_VIEWS_INFO_BAR_VIEW_H_ | 87 #endif // CHROME_BROWSER_VIEWS_INFO_BAR_VIEW_H_ |
88 | 88 |
OLD | NEW |