OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/autofill/autofill_popup_base_view_cocoa.h" | 5 #import "chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.h" |
6 | 6 |
7 #include "chrome/browser/ui/autofill/autofill_popup_view_delegate.h" | 7 #include "chrome/browser/ui/autofill/autofill_popup_view_delegate.h" |
8 #include "chrome/browser/ui/autofill/popup_constants.h" | 8 #include "chrome/browser/ui/autofill/popup_constants.h" |
9 #include "ui/base/cocoa/window_size_constants.h" | 9 #include "ui/base/cocoa/window_size_constants.h" |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 } | 34 } |
35 | 35 |
36 - (NSColor*)subtextColor { | 36 - (NSColor*)subtextColor { |
37 // Represents #646464. | 37 // Represents #646464. |
38 return [NSColor colorWithCalibratedRed:100.0 / 255.0 | 38 return [NSColor colorWithCalibratedRed:100.0 / 255.0 |
39 green:100.0 / 255.0 | 39 green:100.0 / 255.0 |
40 blue:100.0 / 255.0 | 40 blue:100.0 / 255.0 |
41 alpha:1.0]; | 41 alpha:1.0]; |
42 } | 42 } |
43 | 43 |
44 - (NSColor*)warningColor { | |
45 // Represents #646464. | |
46 return [NSColor colorWithCalibratedRed:100.0 / 255.0 | |
47 green:100.0 / 255.0 | |
48 blue:100.0 / 255.0 | |
49 alpha:1.0]; | |
50 } | |
51 | |
52 #pragma mark - | 44 #pragma mark - |
53 #pragma mark Public methods | 45 #pragma mark Public methods |
54 | 46 |
55 - (id)initWithDelegate:(autofill::AutofillPopupViewDelegate*)delegate | 47 - (id)initWithDelegate:(autofill::AutofillPopupViewDelegate*)delegate |
56 frame:(NSRect)frame { | 48 frame:(NSRect)frame { |
57 self = [super initWithFrame:frame]; | 49 self = [super initWithFrame:frame]; |
58 if (self) | 50 if (self) |
59 popup_delegate_ = delegate; | 51 popup_delegate_ = delegate; |
60 | 52 |
61 return self; | 53 return self; |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 | 167 |
176 - (void)hidePopup { | 168 - (void)hidePopup { |
177 // Remove the child window before closing, otherwise it can mess up | 169 // Remove the child window before closing, otherwise it can mess up |
178 // display ordering. | 170 // display ordering. |
179 NSWindow* window = [self window]; | 171 NSWindow* window = [self window]; |
180 [[window parentWindow] removeChildWindow:window]; | 172 [[window parentWindow] removeChildWindow:window]; |
181 [window close]; | 173 [window close]; |
182 } | 174 } |
183 | 175 |
184 @end | 176 @end |
OLD | NEW |