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

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

Issue 21692002: Rename AutofillDialogController to AutofillDialogViewDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 years, 4 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
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_account_chooser.h" 5 #import "chrome/browser/ui/cocoa/autofill/autofill_account_chooser.h"
6 6
7 #include "base/strings/sys_string_conversions.h" 7 #include "base/strings/sys_string_conversions.h"
8 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h" 8 #include "chrome/browser/ui/autofill/autofill_dialog_view_delegate.h"
9 #include "chrome/browser/ui/chrome_style.h" 9 #include "chrome/browser/ui/chrome_style.h"
10 #include "chrome/browser/ui/cocoa/autofill/autofill_dialog_constants.h" 10 #include "chrome/browser/ui/cocoa/autofill/autofill_dialog_constants.h"
11 #import "chrome/browser/ui/cocoa/autofill/down_arrow_popup_menu_cell.h" 11 #import "chrome/browser/ui/cocoa/autofill/down_arrow_popup_menu_cell.h"
12 #import "chrome/browser/ui/cocoa/menu_button.h" 12 #import "chrome/browser/ui/cocoa/menu_button.h"
13 #include "grit/ui_resources.h" 13 #include "grit/ui_resources.h"
14 #include "skia/ext/skia_utils_mac.h" 14 #include "skia/ext/skia_utils_mac.h"
15 #import "ui/base/cocoa/controls/hyperlink_button_cell.h" 15 #import "ui/base/cocoa/controls/hyperlink_button_cell.h"
16 #include "ui/base/models/menu_model.h" 16 #include "ui/base/models/menu_model.h"
17 #include "ui/base/resource/resource_bundle.h" 17 #include "ui/base/resource/resource_bundle.h"
18 18
(...skipping 21 matching lines...) Expand all
40 40
41 #pragma mark AutofillAccountChooser 41 #pragma mark AutofillAccountChooser
42 42
43 @interface AutofillAccountChooser (Private) 43 @interface AutofillAccountChooser (Private)
44 - (void)performLayout; 44 - (void)performLayout;
45 @end 45 @end
46 46
47 @implementation AutofillAccountChooser 47 @implementation AutofillAccountChooser
48 48
49 - (id)initWithFrame:(NSRect)frame 49 - (id)initWithFrame:(NSRect)frame
50 controller:(autofill::AutofillDialogController*)controller { 50 controller:(autofill::AutofillDialogViewDelegate*)controller {
51 if ((self = [super initWithFrame:frame])) { 51 if ((self = [super initWithFrame:frame])) {
52 controller_ = controller; 52 controller_ = controller;
53 53
54 icon_.reset([[NSImageView alloc] initWithFrame:NSZeroRect]); 54 icon_.reset([[NSImageView alloc] initWithFrame:NSZeroRect]);
55 [icon_ setImageFrameStyle:NSImageFrameNone]; 55 [icon_ setImageFrameStyle:NSImageFrameNone];
56 56
57 link_.reset([[HyperlinkButtonCell buttonWithString: 57 link_.reset([[HyperlinkButtonCell buttonWithString:
58 base::SysUTF16ToNSString(controller_->SignInLinkText())] retain]); 58 base::SysUTF16ToNSString(controller_->SignInLinkText())] retain]);
59 [link_ setAction:@selector(linkClicked:)]; 59 [link_ setAction:@selector(linkClicked:)];
60 [link_ setTarget:self]; 60 [link_ setTarget:self];
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 frame.origin.x = NSMaxX(bounds) - NSWidth(frame); 142 frame.origin.x = NSMaxX(bounds) - NSWidth(frame);
143 [activeControl setFrame:frame]; 143 [activeControl setFrame:frame];
144 144
145 [icon_ setFrameSize:[[icon_ image] size]]; 145 [icon_ setFrameSize:[[icon_ image] size]];
146 frame.origin.x -= NSWidth([icon_ frame]) + kAroundTextPadding; 146 frame.origin.x -= NSWidth([icon_ frame]) + kAroundTextPadding;
147 [icon_ setFrameOrigin:frame.origin]; 147 [icon_ setFrameOrigin:frame.origin];
148 } 148 }
149 149
150 @end 150 @end
151 151
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698