Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_DIALOG_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_DIALOG_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_DIALOG_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_DIALOG_CONTROLLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
| 10 | 10 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" | 12 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" |
| 13 | 13 |
| 14 @class BrowserWindowController; | 14 @class BrowserWindowController; |
| 15 | 15 |
| 16 // Displays the one-click signin confirmation bubble (after syncing | 16 // Displays the one-click signin confirmation bubble (after syncing |
| 17 // has started). | 17 // has started). |
| 18 @interface OneClickSigninBubbleController : BaseBubbleController { | 18 @interface OneClickSigninBubbleController : BaseBubbleController { |
| 19 @private | 19 @private |
| 20 IBOutlet NSTextField* messageField_; | 20 IBOutlet NSTextField* messageField_; |
| 21 IBOutlet NSButton* learnMoreLink_; | |
|
akalin
2012/05/17 00:39:24
leave this variable in, and add a TODO for me to r
Roger Tawa OOO till Jul 10th
2012/05/17 21:17:37
Done.
| |
| 22 IBOutlet NSButton* advancedLink_; | 21 IBOutlet NSButton* advancedLink_; |
| 23 | 22 |
| 24 base::Closure learnMoreCallback_; | 23 base::Callback<void(bool)> start_sync_callback_; |
| 25 base::Closure advancedCallback_; | |
| 26 } | 24 } |
| 27 | 25 |
| 28 // Initializes with a browser window controller, under whose wrench | 26 // Initializes with a browser window controller, under whose wrench |
| 29 // menu this bubble will be displayed, and callbacks which are called | 27 // menu this bubble will be displayed, and callbacks which are called |
| 30 // if the user clicks the corresponding link. | 28 // if the user clicks the corresponding link. |
| 31 // | 29 // |
| 32 // The bubble is not automatically displayed; call showWindow:id to | 30 // The bubble is not automatically displayed; call showWindow:id to |
| 33 // display. The bubble is auto-released on close. | 31 // display. The bubble is auto-released on close. |
| 34 - (id)initWithBrowserWindowController:(BrowserWindowController*)controller | 32 - (id)initWithBrowserWindowController:(BrowserWindowController*)controller |
| 35 learnMoreCallback:(const base::Closure&)learnMoreCallback | 33 start_sync_callback:(const base::Callback<void(bool)>&)start_sync_callback; |
|
akalin
2012/05/17 00:39:24
obj-c style is to align the :s. If you use 'const
| |
| 36 advancedCallback:(const base::Closure&)advancedCallback; | 34 |
| 35 // Starts sync and closes teh bubble.. | |
|
akalin
2012/05/17 00:39:24
typo
Roger Tawa OOO till Jul 10th
2012/05/17 21:17:37
Done.
| |
| 36 - (IBAction)ok:(id)sender; | |
| 37 | 37 |
| 38 // Just closes the bubble. | 38 // Just closes the bubble. |
|
akalin
2012/05/17 00:39:24
this would require nib changes too. Just leave th
Roger Tawa OOO till Jul 10th
2012/05/17 21:17:37
Done.
| |
| 39 - (IBAction)ok:(id)sender; | 39 - (IBAction)undo:(id)sender; |
| 40 | |
| 41 // Calls |learnMoreCallback_|. | |
| 42 - (IBAction)onClickLearnMoreLink:(id)sender; | |
| 43 | 40 |
| 44 // Calls |advancedCallback_|. | 41 // Calls |advancedCallback_|. |
| 45 - (IBAction)onClickAdvancedLink:(id)sender; | 42 - (IBAction)onClickAdvancedLink:(id)sender; |
| 46 | 43 |
| 47 @end | 44 @end |
| 48 | 45 |
| 49 #endif // CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_DIALOG_CONTROLLER_H_ | 46 #endif // CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_DIALOG_CONTROLLER_H_ |
| OLD | NEW |