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

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

Issue 123313002: [rAC, OSX] Always close error bubble on focus loss (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 [[errorBubbleController_ bubble] setAlignment: 200 [[errorBubbleController_ bubble] setAlignment:
201 info_bubble::kAlignLeftEdgeToAnchorEdge]; 201 info_bubble::kAlignLeftEdgeToAnchorEdge];
202 } 202 }
203 [errorBubbleController_ setAnchorPoint: 203 [errorBubbleController_ setAnchorPoint:
204 [parentWindow convertBaseToScreen:anchorPoint]]; 204 [parentWindow convertBaseToScreen:anchorPoint]];
205 205
206 [errorBubbleController_ showWindow:self]; 206 [errorBubbleController_ showWindow:self];
207 } 207 }
208 208
209 - (void)hideErrorBubble { 209 - (void)hideErrorBubble {
210 [errorBubble_ setHidden:YES]; 210 [errorBubbleController_ close];
211 } 211 }
212 212
213 - (void)updateMessageForField:(NSControl<AutofillInputField>*)field { 213 - (void)updateMessageForField:(NSControl<AutofillInputField>*)field {
214 // Ignore fields that are not first responder. Testing this is a bit 214 // Ignore fields that are not first responder. Testing this is a bit
215 // convoluted, since for NSTextFields with firstResponder status, the 215 // convoluted, since for NSTextFields with firstResponder status, the
216 // firstResponder is a subview of the NSTextField, not the field itself. 216 // firstResponder is a subview of the NSTextField, not the field itself.
217 NSView* firstResponderView = 217 NSView* firstResponderView =
218 base::mac::ObjCCast<NSView>([[field window] firstResponder]); 218 base::mac::ObjCCast<NSView>([[field window] firstResponder]);
219 if (![firstResponderView isDescendantOf:field]) 219 if (![firstResponderView isDescendantOf:field])
220 return; 220 return;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 } 263 }
264 264
265 selectedField = field; 265 selectedField = field;
266 selectedFieldOrigin = fieldOrigin; 266 selectedFieldOrigin = fieldOrigin;
267 } 267 }
268 268
269 return selectedField; 269 return selectedField;
270 } 270 }
271 271
272 @end 272 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698