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_COCOA_INFOBARS_INFOBAR_GRADIENT_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_INFOBARS_INFOBAR_GRADIENT_VIEW_H_ |
6 #define CHROME_BROWSER_UI_COCOA_INFOBARS_INFOBAR_GRADIENT_VIEW_H_ | 6 #define CHROME_BROWSER_UI_COCOA_INFOBARS_INFOBAR_GRADIENT_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/browser/tab_contents/infobar_delegate.h" | 9 #include "chrome/browser/tab_contents/infobar_delegate.h" |
10 #import "chrome/browser/ui/cocoa/vertical_gradient_view.h" | 10 #import "chrome/browser/ui/cocoa/vertical_gradient_view.h" |
11 | 11 |
12 #import <Cocoa/Cocoa.h> | 12 #import <Cocoa/Cocoa.h> |
13 | 13 |
14 // A custom view that draws the background gradient for an infobar. | 14 // A custom view that draws the background gradient for an infobar. |
15 @interface InfoBarGradientView : VerticalGradientView | 15 @interface InfoBarGradientView : VerticalGradientView { |
| 16 @private |
| 17 NSPoint tipApex_; |
| 18 } |
| 19 |
| 20 // The point, in this view's coordinates, at which the infobar tip is the |
| 21 // highest and pointing at the omnibox decoration. |
| 22 @property(assign, nonatomic) NSPoint tipApex; |
16 | 23 |
17 // Sets the infobar type. This will change the view's gradient. | 24 // Sets the infobar type. This will change the view's gradient. |
18 - (void)setInfobarType:(InfoBarDelegate::Type)infobarType; | 25 - (void)setInfobarType:(InfoBarDelegate::Type)infobarType; |
19 | 26 |
20 @end | 27 @end |
21 | 28 |
22 #endif // CHROME_BROWSER_UI_COCOA_INFOBARS_INFOBAR_GRADIENT_VIEW_H_ | 29 #endif // CHROME_BROWSER_UI_COCOA_INFOBARS_INFOBAR_GRADIENT_VIEW_H_ |
OLD | NEW |