Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: chrome/browser/ui/cocoa/autofill/autofill_details_container.mm

Issue 1775223002: Prepare chrome/ for compilation with OS X 10.7 deployment target. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_details_container.h" 5 #import "chrome/browser/ui/cocoa/autofill/autofill_details_container.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/mac/foundation_util.h" 9 #include "base/mac/foundation_util.h"
10 #include "chrome/browser/ui/autofill/autofill_dialog_view_delegate.h" 10 #include "chrome/browser/ui/autofill/autofill_dialog_view_delegate.h"
11 #import "chrome/browser/ui/cocoa/autofill/autofill_bubble_controller.h" 11 #import "chrome/browser/ui/cocoa/autofill/autofill_bubble_controller.h"
12 #import "chrome/browser/ui/cocoa/autofill/autofill_section_container.h" 12 #import "chrome/browser/ui/cocoa/autofill/autofill_section_container.h"
13 #import "chrome/browser/ui/cocoa/info_bubble_view.h" 13 #import "chrome/browser/ui/cocoa/info_bubble_view.h"
14 #include "ui/base/cocoa/cocoa_base_utils.h"
14 15
15 typedef BOOL (^FieldFilterBlock)(NSView<AutofillInputField>*); 16 typedef BOOL (^FieldFilterBlock)(NSView<AutofillInputField>*);
16 17
17 @interface AutofillDetailsContainer () 18 @interface AutofillDetailsContainer ()
18 19
19 // Find the editable input field that is closest to the top of the dialog and 20 // Find the editable input field that is closest to the top of the dialog and
20 // matches the |predicateBlock|. 21 // matches the |predicateBlock|.
21 - (NSView*)firstEditableFieldMatchingBlock:(FieldFilterBlock)predicateBlock; 22 - (NSView*)firstEditableFieldMatchingBlock:(FieldFilterBlock)predicateBlock;
22 23
23 @end 24 @end
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 [[errorBubbleController_ bubble] setArrowLocation:info_bubble::kTopRight]; 209 [[errorBubbleController_ bubble] setArrowLocation:info_bubble::kTopRight];
209 [[errorBubbleController_ bubble] setAlignment: 210 [[errorBubbleController_ bubble] setAlignment:
210 info_bubble::kAlignRightEdgeToAnchorEdge]; 211 info_bubble::kAlignRightEdgeToAnchorEdge];
211 212
212 } else { 213 } else {
213 anchorPoint = NSMakePoint(NSMinX(viewRect), NSMinY(viewRect)); 214 anchorPoint = NSMakePoint(NSMinX(viewRect), NSMinY(viewRect));
214 [[errorBubbleController_ bubble] setArrowLocation:info_bubble::kTopLeft]; 215 [[errorBubbleController_ bubble] setArrowLocation:info_bubble::kTopLeft];
215 [[errorBubbleController_ bubble] setAlignment: 216 [[errorBubbleController_ bubble] setAlignment:
216 info_bubble::kAlignLeftEdgeToAnchorEdge]; 217 info_bubble::kAlignLeftEdgeToAnchorEdge];
217 } 218 }
218 [errorBubbleController_ setAnchorPoint: 219 [errorBubbleController_ setAnchorPoint:ui::ConvertPointFromWindowToScreen(
219 [parentWindow convertBaseToScreen:anchorPoint]]; 220 parentWindow, anchorPoint)];
220 221
221 errorBubbleAnchorView_ = field; 222 errorBubbleAnchorView_ = field;
222 [errorBubbleController_ showWindow:self]; 223 [errorBubbleController_ showWindow:self];
223 } 224 }
224 225
225 - (void)hideErrorBubble { 226 - (void)hideErrorBubble {
226 [errorBubbleController_ close]; 227 [errorBubbleController_ close];
227 } 228 }
228 229
229 - (void)updateMessageForField:(NSControl<AutofillInputField>*)field { 230 - (void)updateMessageForField:(NSControl<AutofillInputField>*)field {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 } 280 }
280 281
281 selectedField = field; 282 selectedField = field;
282 selectedFieldOrigin = fieldOrigin; 283 selectedFieldOrigin = fieldOrigin;
283 } 284 }
284 285
285 return selectedField; 286 return selectedField;
286 } 287 }
287 288
288 @end 289 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698