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/mac/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 // This is YES if this is the modal sync confirmation dialog. | 28 // This is YES if this is the modal sync confirmation dialog. |
29 BOOL isSyncDialog_; | 29 BOOL isSyncDialog_; |
30 | 30 |
31 // This is YES if the user clicked the Learn More link before another action. | 31 // This is YES if the user clicked the Learn More link before another action. |
32 BOOL clickedLearnMore_; | 32 BOOL clickedLearnMore_; |
33 | 33 |
34 scoped_nsobject<NSString> errorMessage_; | 34 base::scoped_nsobject<NSString> errorMessage_; |
35 | 35 |
36 // Text fields don't work as well with embedded links as text views, but | 36 // Text fields don't work as well with embedded links as text views, but |
37 // text views cannot conveniently be created in IB. The xib file contains | 37 // text views cannot conveniently be created in IB. The xib file contains |
38 // a text field |informativePlaceholderTextField_| that's replaced by this | 38 // a text field |informativePlaceholderTextField_| that's replaced by this |
39 // text view |promo_| in -awakeFromNib. | 39 // text view |promo_| in -awakeFromNib. |
40 scoped_nsobject<HyperlinkTextView> informativeTextView_; | 40 base::scoped_nsobject<HyperlinkTextView> informativeTextView_; |
41 BrowserWindow::StartSyncCallback startSyncCallback_; | 41 BrowserWindow::StartSyncCallback startSyncCallback_; |
42 base::Closure closeCallback_; | 42 base::Closure closeCallback_; |
43 content::WebContents* webContents_; | 43 content::WebContents* webContents_; |
44 } | 44 } |
45 | 45 |
46 // Initializes the controller from a nib file, with an alternate |errorMessage| | 46 // Initializes the controller from a nib file, with an alternate |errorMessage| |
47 // that can be displayed in the case of an authentication error, | 47 // that can be displayed in the case of an authentication error, |
48 // |syncCallback| is called to start sync if |isSyncDialog| is YES, | 48 // |syncCallback| is called to start sync if |isSyncDialog| is YES, |
49 // |webContents| is used to open the Learn More and Advanced links and | 49 // |webContents| is used to open the Learn More and Advanced links and |
50 // |callback| is called when the view is closing. | 50 // |callback| is called when the view is closing. |
(...skipping 15 matching lines...) Expand all Loading... |
66 | 66 |
67 // Does not start sync and closes the bubble. | 67 // Does not start sync and closes the bubble. |
68 - (IBAction)onClickUndo:(id)sender; | 68 - (IBAction)onClickUndo:(id)sender; |
69 | 69 |
70 // Calls |advancedCallback_|. | 70 // Calls |advancedCallback_|. |
71 - (IBAction)onClickAdvancedLink:(id)sender; | 71 - (IBAction)onClickAdvancedLink:(id)sender; |
72 | 72 |
73 @end | 73 @end |
74 | 74 |
75 #endif // CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_VIEW_CONTROLLER_H_ | 75 #endif // CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_VIEW_CONTROLLER_H_ |
OLD | NEW |