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

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

Issue 974323002: Componentize autofill dialog common code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 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"
11 #include "chrome/browser/ui/autofill/autofill_dialog_view_delegate.h" 10 #include "chrome/browser/ui/autofill/autofill_dialog_view_delegate.h"
12 #include "chrome/browser/ui/cocoa/autofill/autofill_dialog_constants.h" 11 #include "chrome/browser/ui/cocoa/autofill/autofill_dialog_constants.h"
12 #include "components/autofill/core/browser/ui/autofill_dialog_types.h"
13 #include "skia/ext/skia_utils_mac.h" 13 #include "skia/ext/skia_utils_mac.h"
14 14
15 namespace { 15 namespace {
16 16
17 // Spacing around the message in the overlay view. 17 // Spacing around the message in the overlay view.
18 const CGFloat kOverlayLabelPadding = 34; 18 const CGFloat kOverlayLabelPadding = 34;
19 19
20 // Spacing below image and above text messages in overlay view. 20 // Spacing below image and above text messages in overlay view.
21 const CGFloat kOverlayImageVerticalPadding = 90; 21 const CGFloat kOverlayImageVerticalPadding = 90;
22 22
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 [messageView_ setFrame:NSMakeRect(0, 0, NSWidth(bounds), messageHeight)]; 177 [messageView_ setFrame:NSMakeRect(0, 0, NSWidth(bounds), messageHeight)];
178 [messageView_ performLayout]; 178 [messageView_ performLayout];
179 179
180 NSSize imageSize = [[imageView_ image] size]; 180 NSSize imageSize = [[imageView_ image] size];
181 [imageView_ setFrame:NSMakeRect( 181 [imageView_ setFrame:NSMakeRect(
182 0, NSMaxY([messageView_ frame]) + kOverlayImageVerticalPadding, 182 0, NSMaxY([messageView_ frame]) + kOverlayImageVerticalPadding,
183 NSWidth(bounds), imageSize.height)]; 183 NSWidth(bounds), imageSize.height)];
184 } 184 }
185 185
186 @end 186 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698