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 #include "chrome/browser/ui/browser_window.h" | |
12 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" | 13 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" |
13 | 14 |
14 @class BrowserWindowController; | 15 @class BrowserWindowController; |
15 | 16 |
16 // Displays the one-click signin confirmation bubble (after syncing | 17 // Displays the one-click signin confirmation bubble (after syncing |
17 // has started). | 18 // has started). |
18 @interface OneClickSigninBubbleController : BaseBubbleController { | 19 @interface OneClickSigninBubbleController : BaseBubbleController { |
19 @private | 20 @private |
20 IBOutlet NSTextField* messageField_; | 21 IBOutlet NSTextField* messageField_; |
22 // TODO(akalin): learnMoreLink_ needs to be removed, but it can't until | |
23 // the nib is changed too. | |
21 IBOutlet NSButton* learnMoreLink_; | 24 IBOutlet NSButton* learnMoreLink_; |
22 IBOutlet NSButton* advancedLink_; | 25 IBOutlet NSButton* advancedLink_; |
23 | 26 |
24 base::Closure learnMoreCallback_; | 27 BrowserWindow::StartSyncCallback start_sync_callback_; |
akalin
2012/05/24 18:42:04
may need this callback to behave like the other pl
Roger Tawa OOO till Jul 10th
2012/05/24 19:08:33
Done.
| |
25 base::Closure advancedCallback_; | |
26 } | 28 } |
27 | 29 |
28 // Initializes with a browser window controller, under whose wrench | 30 // Initializes with a browser window controller, under whose wrench |
29 // menu this bubble will be displayed, and callbacks which are called | 31 // menu this bubble will be displayed, and callbacks which are called |
30 // if the user clicks the corresponding link. | 32 // if the user clicks the corresponding link. |
31 // | 33 // |
32 // The bubble is not automatically displayed; call showWindow:id to | 34 // The bubble is not automatically displayed; call showWindow:id to |
33 // display. The bubble is auto-released on close. | 35 // display. The bubble is auto-released on close. |
34 - (id)initWithBrowserWindowController:(BrowserWindowController*)controller | 36 - (id)initWithBrowserWindowController:(BrowserWindowController*)controller |
35 learnMoreCallback:(const base::Closure&)learnMoreCallback | 37 start_sync_callback: |
36 advancedCallback:(const base::Closure&)advancedCallback; | 38 (const BrowserWindow::StartSyncCallback&) |
39 start_sync_callback; | |
37 | 40 |
38 // Just closes the bubble. | 41 // Starts sync and closes the bubble. |
39 - (IBAction)ok:(id)sender; | 42 - (IBAction)ok:(id)sender; |
40 | 43 |
41 // Calls |learnMoreCallback_|. | |
42 - (IBAction)onClickLearnMoreLink:(id)sender; | |
43 | |
44 // Calls |advancedCallback_|. | 44 // Calls |advancedCallback_|. |
45 - (IBAction)onClickAdvancedLink:(id)sender; | 45 - (IBAction)onClickAdvancedLink:(id)sender; |
46 | 46 |
47 @end | 47 @end |
48 | 48 |
49 #endif // CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_DIALOG_CONTROLLER_H_ | 49 #endif // CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_DIALOG_CONTROLLER_H_ |
OLD | NEW |