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_ITEM_VIEW_H__ | 5 #ifndef CHROME_BROWSER_VIEWS_INFO_BAR_ITEM_VIEW_H__ |
6 #define CHROME_BROWSER_VIEWS_INFO_BAR_ITEM_VIEW_H__ | 6 #define CHROME_BROWSER_VIEWS_INFO_BAR_ITEM_VIEW_H__ |
7 | 7 |
8 #include "chrome/browser/views/info_bar_view.h" | 8 #include "chrome/browser/views/info_bar_view.h" |
9 #include "chrome/common/slide_animation.h" | 9 #include "chrome/common/slide_animation.h" |
10 #include "chrome/views/button.h" | 10 #include "chrome/views/button.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 class InfoBarItemView : public ChromeViews::View, | 36 class InfoBarItemView : public ChromeViews::View, |
37 public ChromeViews::BaseButton::ButtonListener, | 37 public ChromeViews::BaseButton::ButtonListener, |
38 public AnimationDelegate { | 38 public AnimationDelegate { |
39 public: | 39 public: |
40 InfoBarItemView(); | 40 InfoBarItemView(); |
41 | 41 |
42 virtual ~InfoBarItemView(); | 42 virtual ~InfoBarItemView(); |
43 | 43 |
44 // The preferred height is equal to the maximum height of all views | 44 // The preferred height is equal to the maximum height of all views |
45 // in the info bar. Preferred width is equal to the parents width. | 45 // in the info bar. Preferred width is equal to the parents width. |
46 virtual void GetPreferredSize(CSize* out); | 46 virtual gfx::Size GetPreferredSize(); |
47 | 47 |
48 // Lays out all child views of the info bar from trailing to leading. | 48 // Lays out all child views of the info bar from trailing to leading. |
49 virtual void Layout(); | 49 virtual void Layout(); |
50 | 50 |
51 virtual void DidChangeBounds(const CRect& previous, const CRect& current); | 51 virtual void DidChangeBounds(const CRect& previous, const CRect& current); |
52 | 52 |
53 // Starts the close animation, which will end in the bar closing itself. | 53 // Starts the close animation, which will end in the bar closing itself. |
54 void BeginClose(); | 54 void BeginClose(); |
55 | 55 |
56 // Removes this InfoBarItem from its parent view and then deletes it. | 56 // Removes this InfoBarItem from its parent view and then deletes it. |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 // Tracks and stores the last focused view which is not the InfoBarItemView or | 130 // Tracks and stores the last focused view which is not the InfoBarItemView or |
131 // any of its children. Used to restore focus once the InfoBarItemView is | 131 // any of its children. Used to restore focus once the InfoBarItemView is |
132 // closed. | 132 // closed. |
133 scoped_ptr<ChromeViews::ExternalFocusTracker> focus_tracker_; | 133 scoped_ptr<ChromeViews::ExternalFocusTracker> focus_tracker_; |
134 | 134 |
135 DISALLOW_EVIL_CONSTRUCTORS(InfoBarItemView); | 135 DISALLOW_EVIL_CONSTRUCTORS(InfoBarItemView); |
136 }; | 136 }; |
137 | 137 |
138 #endif // CHROME_BROWSER_VIEWS_INFO_BAR_ITEM_VIEW_H__ | 138 #endif // CHROME_BROWSER_VIEWS_INFO_BAR_ITEM_VIEW_H__ |
139 | 139 |
OLD | NEW |