Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / profile_signin_confirmation_view_controller.h
blobffde5c4bd9a55d1010236b5a27d2d37e30553435
1 // Copyright 2013 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.
5 #ifndef CHROME_BROWSER_UI_COCOA_PROFILE_SIGNIN_CONFIRMATION_VIEW_CONTROLLER_
6 #define CHROME_BROWSER_UI_COCOA_PROFILE_SIGNIN_CONFIRMATION_VIEW_CONTROLLER_
8 #import <Cocoa/Cocoa.h>
9 #include <string>
11 #include "base/callback.h"
12 #include "base/mac/scoped_nsobject.h"
13 #include "chrome/browser/ui/cocoa/constrained_window/constrained_window_button.h"
15 @class HyperlinkTextView;
16 class Browser;
17 class Profile;
19 namespace ui {
20 class ProfileSigninConfirmationDelegate;
23 @interface ProfileSigninConfirmationViewController
24 : NSViewController<NSTextViewDelegate> {
25 @private
26 // The browser object for the sign-in tab.
27 Browser* browser_;
29 // The GAIA username being signed in.
30 std::string username_;
32 // Indicates whether the user should be given the option to
33 // create a new profile before completing sign-in.
34 bool offerProfileCreation_;
36 // Dialog button callbacks.
37 ui::ProfileSigninConfirmationDelegate* delegate_;
38 base::Closure closeDialogCallback_;
40 // UI elements.
41 base::scoped_nsobject<NSBox> promptBox_;
42 base::scoped_nsobject<NSButton> closeButton_;
43 base::scoped_nsobject<NSTextField> titleField_;
44 base::scoped_nsobject<NSTextField> promptField_;
45 base::scoped_nsobject<NSTextView> explanationField_;
46 base::scoped_nsobject<ConstrainedWindowButton> createProfileButton_;
47 base::scoped_nsobject<ConstrainedWindowButton> cancelButton_;
48 base::scoped_nsobject<ConstrainedWindowButton> okButton_;
51 - (id)initWithBrowser:(Browser*)browser
52 username:(const std::string&)username
53 delegate:(ui::ProfileSigninConfirmationDelegate*)delegate
54 closeDialogCallback:(const base::Closure&)closeDialogCallback
55 offerProfileCreation:(bool)offer;
56 - (IBAction)cancel:(id)sender;
57 - (IBAction)ok:(id)sender;
58 - (IBAction)close:(id)sender;
59 - (IBAction)createProfile:(id)sender;
61 @end
63 @interface ProfileSigninConfirmationViewController (TestingAPI)
65 @property(readonly, nonatomic) ui::ProfileSigninConfirmationDelegate* delegate;
66 @property(readonly, nonatomic) NSButton* createProfileButton;
67 @property(readonly, nonatomic) NSTextView* explanationField;
69 @end
71 #endif // CHROME_BROWSER_UI_COCOA_PROFILE_SIGNIN_CONFIRMATION_VIEW_CONTROLLER_