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..13af587afbe9a67658a35060b5a6b54e93793ef2 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 BrowserWindow::StartSyncCallback&) |
+ start_sync_callback { |
NSWindow* parentWindow = [controller window]; |
// Set the anchor point to right below the wrench menu. |
@@ -43,26 +43,25 @@ 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); |
akalin
2012/05/24 18:42:04
gotta change this bool
Roger Tawa OOO till Jul 10th
2012/05/24 19:08:33
Done in lastest patchset.
|
[self close]; |
} |
-- (IBAction)onClickLearnMoreLink:(id)sender { |
akalin
2012/05/24 18:42:04
need to keep this method since the button is still
Roger Tawa OOO till Jul 10th
2012/05/24 19:08:33
Done.
|
- learnMoreCallback_.Run(); |
-} |
- |
- (IBAction)onClickAdvancedLink:(id)sender { |
- advancedCallback_.Run(); |
+ start_sync_callback_.Run(false); |
akalin
2012/05/24 18:42:04
this, too
Roger Tawa OOO till Jul 10th
2012/05/24 19:08:33
Done in lastest patchset.
|
+ [self close]; |
} |
+// TODO(rogerta): if the bubble is closed without interaction, need to call |
+// the callback with argument set to true. |
akalin
2012/05/24 18:42:04
update comment (true -> whatever the enum value is
Roger Tawa OOO till Jul 10th
2012/05/24 19:08:33
Done in lastest patchset.
|
+ |
- (void)awakeFromNib { |
[super awakeFromNib]; |