OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef 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 |
| 8 |
| 9 #import <Cocoa/Cocoa.h> |
| 10 |
| 11 #include "base/callback.h" |
| 12 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" |
| 13 |
| 14 @class BrowserWindowController; |
| 15 |
| 16 // Displays the one-click signin confirmation bubble (after syncing |
| 17 // has started). |
| 18 @interface OneClickSigninBubbleController : BaseBubbleController { |
| 19 @private |
| 20 IBOutlet NSTextField* messageField_; |
| 21 IBOutlet NSButton* learnMoreLink_; |
| 22 IBOutlet NSButton* advancedLink_; |
| 23 |
| 24 base::Closure learnMoreCallback_; |
| 25 base::Closure advancedCallback_; |
| 26 } |
| 27 |
| 28 // Initializes with a browser window controller, under whose wrench |
| 29 // menu this bubble will be displayed, and callbacks which are called |
| 30 // if the user clicks the corresponding link. |
| 31 // |
| 32 // The bubble is not automatically displayed; call showWindow:id to |
| 33 // display. The bubble is auto-released on close. |
| 34 - (id)initWithBrowserWindowController:(BrowserWindowController*)controller |
| 35 learnMoreCallback:(const base::Closure&)learnMoreCallback |
| 36 advancedCallback:(const base::Closure&)advancedCallback; |
| 37 |
| 38 // Just closes the bubble. |
| 39 - (IBAction)ok:(id)sender; |
| 40 |
| 41 // Calls |learnMoreCallback_|. |
| 42 - (IBAction)onClickLearnMoreLink:(id)sender; |
| 43 |
| 44 // Calls |advancedCallback_|. |
| 45 - (IBAction)onClickAdvancedLink:(id)sender; |
| 46 |
| 47 @end |
| 48 |
| 49 #endif // CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_DIALOG_CONTROLLER_H_ |
OLD | NEW |