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_VIEWS_INFOBARS_INFOBAR_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
76 virtual int ContentMinimumWidth() const; | 76 virtual int ContentMinimumWidth() const; |
77 | 77 |
78 // These return x coordinates delimiting the usable area for subclasses to lay | 78 // These return x coordinates delimiting the usable area for subclasses to lay |
79 // out their controls. | 79 // out their controls. |
80 int StartX() const; | 80 int StartX() const; |
81 int EndX() const; | 81 int EndX() const; |
82 | 82 |
83 // Convenience getter. | 83 // Convenience getter. |
84 const InfoBarContainer::Delegate* container_delegate() const; | 84 const InfoBarContainer::Delegate* container_delegate() const; |
85 | 85 |
86 // Subclasses must override and cancel any menus. Because we are deleted after | |
87 // a delay and after our delegate is deleted we have to explicitly cancel the | |
88 // menu rather than relying on the destructor to cancel the menu. | |
89 virtual void CancelMenu() = 0; | |
Peter Kasting
2011/09/12 18:06:00
Nit: I would prefer to not make this pure virtual.
| |
90 | |
86 private: | 91 private: |
87 static const int kHorizontalPadding; | 92 static const int kHorizontalPadding; |
88 | 93 |
89 // InfoBar: | 94 // InfoBar: |
90 virtual void PlatformSpecificShow(bool animate) OVERRIDE; | 95 virtual void PlatformSpecificShow(bool animate) OVERRIDE; |
91 virtual void PlatformSpecificHide(bool animate) OVERRIDE; | 96 virtual void PlatformSpecificHide(bool animate) OVERRIDE; |
92 virtual void PlatformSpecificOnHeightsRecalculated() OVERRIDE; | 97 virtual void PlatformSpecificOnHeightsRecalculated() OVERRIDE; |
93 | 98 |
94 // views::View: | 99 // views::View: |
95 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 100 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
(...skipping 16 matching lines...) Expand all Loading... | |
112 | 117 |
113 // The paths for the InfoBarBackground to draw, sized according to the heights | 118 // The paths for the InfoBarBackground to draw, sized according to the heights |
114 // above. | 119 // above. |
115 SkPath fill_path_; | 120 SkPath fill_path_; |
116 SkPath stroke_path_; | 121 SkPath stroke_path_; |
117 | 122 |
118 DISALLOW_COPY_AND_ASSIGN(InfoBarView); | 123 DISALLOW_COPY_AND_ASSIGN(InfoBarView); |
119 }; | 124 }; |
120 | 125 |
121 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_ | 126 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_ |
OLD | NEW |