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

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

Issue 23653052: [rAc] Fetch username concurrently with fetching Wallet items. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | « chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc ('k') | 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_overlay_controller.h" 5 #import "chrome/browser/ui/cocoa/autofill/autofill_overlay_controller.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/mac/foundation_util.h" 8 #include "base/mac/foundation_util.h"
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" 10 #include "chrome/browser/ui/autofill/autofill_dialog_types.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 [labels addObject:label]; 102 [labels addObject:label];
103 } 103 }
104 [self setSubviews:labels]; 104 [self setSubviews:labels];
105 [self setHidden:([labels count] == 0)]; 105 [self setHidden:([labels count] == 0)];
106 } 106 }
107 107
108 - (void)performLayout { 108 - (void)performLayout {
109 CGFloat y = NSMaxY([self bounds]) - autofill::kArrowHeight - 109 CGFloat y = NSMaxY([self bounds]) - autofill::kArrowHeight -
110 kOverlayTextInterlineSpacing; 110 kOverlayTextInterlineSpacing;
111 for (NSTextView* label in [self subviews]) { 111 for (NSTextView* label in [self subviews]) {
112 DCHECK([label isKindOfClass:[NSTextView class]]); 112 //DCHECK([label isKindOfClass:[NSTextView class]]);
Ilya Sherman 2013/09/20 06:49:56 Augh, please ignore this diff. Btw, this DCHECK c
groby-ooo-7-16 2013/09/20 16:07:13 That is not good, because we _expect_ it to be an
groby-ooo-7-16 2013/09/20 16:10:19 And by "created as labels" I mean created as NSTex
113 CGFloat labelHeight = NSHeight([label frame]); 113 CGFloat labelHeight = NSHeight([label frame]);
114 [label setFrame:NSMakeRect(0, y - labelHeight, 114 [label setFrame:NSMakeRect(0, y - labelHeight,
115 NSWidth([self bounds]), labelHeight)]; 115 NSWidth([self bounds]), labelHeight)];
116 y = NSMinY([label frame]) - kOverlayTextInterlineSpacing; 116 y = NSMinY([label frame]) - kOverlayTextInterlineSpacing;
117 } 117 }
118 DCHECK_GE(y, 0.0); 118 DCHECK_GE(y, 0.0);
119 } 119 }
120 120
121 - (NSSize)preferredSize { 121 - (NSSize)preferredSize {
122 NOTREACHED(); 122 NOTREACHED();
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 NSMakeRect(0, 0, NSWidth(bounds), messageHeight)]; 203 NSMakeRect(0, 0, NSWidth(bounds), messageHeight)];
204 [messageStackView_ performLayout]; 204 [messageStackView_ performLayout];
205 205
206 NSSize imageSize = [[imageView_ image] size]; 206 NSSize imageSize = [[imageView_ image] size];
207 [imageView_ setFrame:NSMakeRect( 207 [imageView_ setFrame:NSMakeRect(
208 0, NSMaxY([messageStackView_ frame]) + kOverlayImageBottomMargin, 208 0, NSMaxY([messageStackView_ frame]) + kOverlayImageBottomMargin,
209 NSWidth(bounds), imageSize.height)]; 209 NSWidth(bounds), imageSize.height)];
210 } 210 }
211 211
212 @end 212 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698