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_VIEW_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_VIEW_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_VIEW_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_VIEW_CONTROLLER_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/memory/scoped_nsobject.h" | 11 #include "base/memory/scoped_nsobject.h" |
| 12 #include "chrome/browser/ui/browser_window.h" | 12 #include "chrome/browser/ui/browser_window.h" |
| 13 | 13 |
| 14 @class BrowserWindowController; | 14 @class BrowserWindowController; |
| 15 namespace content { | 15 namespace content { |
| 16 class WebContents; | 16 class WebContents; |
| 17 } | 17 } |
| 18 @class HyperlinkTextView; | 18 @class HyperlinkTextView; |
| 19 | 19 |
| 20 // View controller for the one-click signin confirmation UI. | 20 // View controller for the one-click signin confirmation UI. |
| 21 @interface OneClickSigninViewController : NSViewController<NSTextViewDelegate> { | 21 @interface OneClickSigninViewController : NSViewController<NSTextViewDelegate> { |
| 22 @private | 22 @private |
| 23 IBOutlet NSTextField* messageTextField_; | 23 IBOutlet NSTextField* messageTextField_; |
| 24 IBOutlet NSTextField* informativePlaceholderTextField_; | 24 IBOutlet NSTextField* informativePlaceholderTextField_; |
| 25 IBOutlet NSButton* advancedLink_; | 25 IBOutlet NSButton* advancedLink_; |
| 26 IBOutlet NSButton* closeButton_; | 26 IBOutlet NSButton* closeButton_; |
| 27 | 27 |
| 28 bool isSyncDialog_; | |
| 29 NSString* errorMessage_; | |
| 30 | |
| 28 // Text fields don't work as well with embedded links as text views, but | 31 // Text fields don't work as well with embedded links as text views, but |
| 29 // text views cannot conveniently be created in IB. The xib file contains | 32 // text views cannot conveniently be created in IB. The xib file contains |
| 30 // a text field |informativePlaceholderTextField_| that's replaced by this | 33 // a text field |informativePlaceholderTextField_| that's replaced by this |
| 31 // text view |promo_| in -awakeFromNib. | 34 // text view |promo_| in -awakeFromNib. |
| 32 scoped_nsobject<HyperlinkTextView> informativeTextView_; | 35 scoped_nsobject<HyperlinkTextView> informativeTextView_; |
| 33 BrowserWindow::StartSyncCallback startSyncCallback_; | 36 BrowserWindow::StartSyncCallback startSyncCallback_; |
| 34 base::Closure closeCallback_; | 37 base::Closure closeCallback_; |
| 35 content::WebContents* webContents_; | 38 content::WebContents* webContents_; |
| 36 } | 39 } |
| 37 | 40 |
| 38 - (id)initWithNibName:(NSString*)nibName | 41 - (id)initWithNibName:(NSString*)nibName |
|
Alexei Svitkine (slow)
2013/04/19 19:54:15
Please document these params.
noms (inactive)
2013/04/22 15:28:07
Done.
| |
| 39 webContents:(content::WebContents*)webContents | 42 webContents:(content::WebContents*)webContents |
| 40 syncCallback:(const BrowserWindow::StartSyncCallback&)syncCallback | 43 syncCallback:(const BrowserWindow::StartSyncCallback&)syncCallback |
| 41 closeCallback:(const base::Closure&)callback; | 44 closeCallback:(const base::Closure&)callback |
| 45 isSyncDialog:(bool)isSyncDialog | |
|
Alexei Svitkine (slow)
2013/04/19 19:54:15
Use the Obj-C type BOOL (with values YES/NO) rathe
noms (inactive)
2013/04/22 15:28:07
Done.
| |
| 46 errorMessage:(const string16&)errorMessage; | |
| 42 | 47 |
| 43 // Called before the view is closed. | 48 // Called before the view is closed. |
| 44 - (void)viewWillClose; | 49 - (void)viewWillClose; |
| 45 | 50 |
| 46 // Starts sync and closes the bubble. | 51 // Starts sync and closes the bubble. |
| 47 - (IBAction)ok:(id)sender; | 52 - (IBAction)ok:(id)sender; |
| 48 | 53 |
| 49 - (IBAction)onClickUndo:(id)sender; | 54 - (IBAction)onClickUndo:(id)sender; |
| 50 | 55 |
| 51 // Calls |advancedCallback_|. | 56 // Calls |advancedCallback_|. |
| 52 - (IBAction)onClickAdvancedLink:(id)sender; | 57 - (IBAction)onClickAdvancedLink:(id)sender; |
| 53 | 58 |
| 54 @end | 59 @end |
| 55 | 60 |
| 56 #endif // CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_VIEW_CONTROLLER_H_ | 61 #endif // CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_VIEW_CONTROLLER_H_ |
| OLD | NEW |