OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/cocoa/cookie_prompt_window_controller.h" | 5 #import "chrome/browser/cocoa/cookie_prompt_window_controller.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "app/l10n_util_mac.h" | 10 #include "app/l10n_util_mac.h" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 frame.origin.y -= sizeDelta; | 113 frame.origin.y -= sizeDelta; |
114 frame.size.height += sizeDelta; | 114 frame.size.height += sizeDelta; |
115 [[self window] setFrame:frame display:NO animate:NO]; | 115 [[self window] setFrame:frame display:NO animate:NO]; |
116 } | 116 } |
117 | 117 |
118 - (void)replaceCookieDetailsView { | 118 - (void)replaceCookieDetailsView { |
119 detailsViewController_.reset([[CookieDetailsViewController alloc] init]); | 119 detailsViewController_.reset([[CookieDetailsViewController alloc] init]); |
120 | 120 |
121 [detailsViewController_ setContentObject:selectionAdapterObject_.get()]; | 121 [detailsViewController_ setContentObject:selectionAdapterObject_.get()]; |
122 | 122 |
123 NSRect viewFrameRect = [disclosedViewPlaceholder_ frame]; | |
124 [[disclosedViewPlaceholder_ superview] | 123 [[disclosedViewPlaceholder_ superview] |
125 replaceSubview:disclosedViewPlaceholder_ | 124 replaceSubview:disclosedViewPlaceholder_ |
126 with:[detailsViewController_ view]]; | 125 with:[detailsViewController_ view]]; |
127 | 126 |
128 [detailsViewController_ shrinkViewToFit]; | 127 [detailsViewController_ shrinkViewToFit]; |
129 } | 128 } |
130 | 129 |
131 - (void)awakeFromNib { | 130 - (void)awakeFromNib { |
132 DCHECK(disclosureButton_); | 131 DCHECK(disclosureButton_); |
133 DCHECK(radioGroupMatrix_); | 132 DCHECK(radioGroupMatrix_); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 [NSApp stopModalWithCode:NSAlertFirstButtonReturn]; | 210 [NSApp stopModalWithCode:NSAlertFirstButtonReturn]; |
212 } | 211 } |
213 | 212 |
214 // Callback for "block" button. | 213 // Callback for "block" button. |
215 - (IBAction)block:(id)sender { | 214 - (IBAction)block:(id)sender { |
216 [[self window] close]; | 215 [[self window] close]; |
217 [NSApp stopModalWithCode:NSAlertSecondButtonReturn]; | 216 [NSApp stopModalWithCode:NSAlertSecondButtonReturn]; |
218 } | 217 } |
219 | 218 |
220 @end | 219 @end |
OLD | NEW |