Chromium Code Reviews| Index: chrome/browser/ui/cocoa/one_click_signin_bubble_controller.mm |
| diff --git a/chrome/browser/ui/cocoa/one_click_signin_bubble_controller.mm b/chrome/browser/ui/cocoa/one_click_signin_bubble_controller.mm |
| index d5c0dd75637e715108ec7bc81436001424e0e475..7985bef03afc6431f067d5125cb69cbe1a8061bd 100644 |
| --- a/chrome/browser/ui/cocoa/one_click_signin_bubble_controller.mm |
| +++ b/chrome/browser/ui/cocoa/one_click_signin_bubble_controller.mm |
| @@ -29,8 +29,8 @@ void ShiftOriginY(NSView* view, CGFloat amount) { |
| @implementation OneClickSigninBubbleController |
| - (id)initWithBrowserWindowController:(BrowserWindowController*)controller |
| - learnMoreCallback:(const base::Closure&)learnMoreCallback |
| - advancedCallback:(const base::Closure&)advancedCallback { |
| + start_sync_callback:(const base::Callback<void(bool)>&) |
| + start_sync_callback { |
| NSWindow* parentWindow = [controller window]; |
| // Set the anchor point to right below the wrench menu. |
| @@ -43,26 +43,29 @@ void ShiftOriginY(NSView* view, CGFloat amount) { |
| if (self = [super initWithWindowNibPath:@"OneClickSigninBubble" |
| parentWindow:parentWindow |
| anchoredAt:anchorPoint]) { |
| - learnMoreCallback_ = learnMoreCallback; |
| - advancedCallback_ = advancedCallback; |
| - DCHECK(!learnMoreCallback_.is_null()); |
| - DCHECK(!advancedCallback_.is_null()); |
| + start_sync_callback_ = start_sync_callback; |
| + DCHECK(!start_sync_callback_.is_null()); |
| } |
| return self; |
| } |
| - (IBAction)ok:(id)sender { |
| + start_sync_callback_.Run(true); |
| [self close]; |
| } |
| -- (IBAction)onClickLearnMoreLink:(id)sender { |
| - learnMoreCallback_.Run(); |
| +- (IBAction)undo:(id)sender { |
|
akalin
2012/05/18 17:57:03
remove this, too, since nothing is calling it yet
Roger Tawa OOO till Jul 10th
2012/05/23 17:13:02
Done.
|
| + [self close]; |
| } |
| - (IBAction)onClickAdvancedLink:(id)sender { |
| - advancedCallback_.Run(); |
| + start_sync_callback_.Run(false); |
| + [self close]; |
| } |
| +// TODO(rogerta): if the bubble is closed without interaction, need to call |
| +// the callback with argument set to true. |
| + |
| - (void)awakeFromNib { |
| [super awakeFromNib]; |