OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #import "chrome/browser/ui/cocoa/infobars/infobar_utilities.h" | 5 #import "chrome/browser/ui/cocoa/infobars/infobar_utilities.h" |
6 | 6 |
7 #include "base/mac/scoped_nsobject.h" | 7 #include "base/mac/scoped_nsobject.h" |
8 #import "chrome/browser/infobars/infobar.h" | |
9 #import "chrome/browser/ui/cocoa/infobars/infobar_container_controller.h" | 8 #import "chrome/browser/ui/cocoa/infobars/infobar_container_controller.h" |
10 #import "chrome/browser/ui/cocoa/infobars/infobar_gradient_view.h" | 9 #import "chrome/browser/ui/cocoa/infobars/infobar_gradient_view.h" |
11 #import "chrome/browser/ui/cocoa/nsview_additions.h" | 10 #import "chrome/browser/ui/cocoa/nsview_additions.h" |
| 11 #import "components/infobars/core/infobar.h" |
12 | 12 |
13 @interface InfobarLabelTextField : NSTextField | 13 @interface InfobarLabelTextField : NSTextField |
14 @end | 14 @end |
15 | 15 |
16 @implementation InfobarLabelTextField | 16 @implementation InfobarLabelTextField |
17 | 17 |
18 - (void)drawRect:(NSRect)rect { | 18 - (void)drawRect:(NSRect)rect { |
19 NSView* infobarGradientView = [self superview]; | 19 NSView* infobarGradientView = [self superview]; |
20 [self cr_drawUsingAncestor:infobarGradientView inRect:rect]; | 20 [self cr_drawUsingAncestor:infobarGradientView inRect:rect]; |
21 [super drawRect:rect]; | 21 [super drawRect:rect]; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 [menu addItem:item]; | 96 [menu addItem:item]; |
97 [item setTarget:target]; | 97 [item setTarget:target]; |
98 if (checked) | 98 if (checked) |
99 [item setState:NSOnState]; | 99 [item setState:NSOnState]; |
100 if (!enabled) | 100 if (!enabled) |
101 [item setEnabled:NO]; | 101 [item setEnabled:NO]; |
102 } | 102 } |
103 } | 103 } |
104 | 104 |
105 } // namespace InfoBarUtilities | 105 } // namespace InfoBarUtilities |
OLD | NEW |