1 // Copyright (c) 2009 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_LOGIN_LOGIN_PROMPT_MAC_H_ 6 #define CHROME_BROWSER_UI_LOGIN_LOGIN_PROMPT_MAC_H_ 7 #pragma once 8 9 #import <Cocoa/Cocoa.h> 10 11 class LoginHandlerMac; 12 13 // Controller of the sheet used by LoginHandlerMac. Interface Builder wants 14 // this to be in a .h file. 15 @interface LoginHandlerSheet : NSWindowController { 16 @private 17 IBOutlet NSTextField* nameField_; 18 IBOutlet NSSecureTextField* passwordField_; 19 IBOutlet NSTextField* explanationField_; 20 IBOutlet NSButton* loginButton_; 21 IBOutlet NSButton* cancelButton_; 22 LoginHandlerMac* handler_; // weak, owns us 23 } 24 - (id)initWithLoginHandler:(LoginHandlerMac*)handler; 25 - (IBAction)loginPressed:(id)sender; 26 - (IBAction)cancelPressed:(id)sender; 27 - (void)sheetDidEnd:(NSWindow*)sheet 28 returnCode:(int)returnCode 29 contextInfo:(void*)contextInfo; 30 - (void)autofillLogin:(NSString*)login password:(NSString*)password; 31 - (void)setExplanation:(NSString*)explanation; 32 @end 33 34 #endif // CHROME_BROWSER_UI_LOGIN_LOGIN_PROMPT_MAC_H_ 35