Revert of Remove OneClickSigninHelper since it is no longer used. (patchset #5 id...
[chromium-blink-merge.git] / remoting / host / mac / me2me_preference_pane_confirm_pin.mm
blobd83468a1dd5d29d83480cd0a583e669a68230c4a
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.
5 #import "remoting/host/mac/me2me_preference_pane_confirm_pin.h"
7 @implementation Me2MePreferencePaneConfirmPin
9 @synthesize delegate = delegate_;
11 - (id)init {
12     self = [super initWithNibName:@"me2me_preference_pane_confirm_pin"
13                            bundle:[NSBundle bundleForClass:[self class]]];
14     return self;
17 - (void)dealloc {
18   [delegate_ release];
19   [super dealloc];
22 - (void)setEmail:(NSString*)email {
23   [email_ setStringValue:email];
26 - (void)setButtonText:(NSString*)text {
27   [apply_button_ setTitle:text];
30 - (void)setEnabled:(BOOL)enabled {
31   [apply_button_ setEnabled:enabled];
32   [pin_ setEnabled:enabled];
33   [[[self view] window] makeFirstResponder:pin_];
34   [apply_button_ setKeyEquivalent:@"\r"];
37 - (void)resetPin {
38   [pin_ setStringValue:@""];
41 - (void)onApply:(id)sender {
42   [delegate_ applyConfiguration:self
43                             pin:[pin_ stringValue]];
46 @end