Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1843)

Unified Diff: remoting/ios/ui/pin_entry_view_controller.h

Issue 186733007: iOS Chromoting Client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: remoting/ios/ui/pin_entry_view_controller.h
diff --git a/remoting/ios/ui/pin_entry_view_controller.h b/remoting/ios/ui/pin_entry_view_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..ef9660f55091e955f8929b58021bad672e21047b
--- /dev/null
+++ b/remoting/ios/ui/pin_entry_view_controller.h
@@ -0,0 +1,47 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef REMOTING_IOS_UI_PIN_ENTRY_VIEW_CONTROLLER_H_
+#define REMOTING_IOS_UI_PIN_ENTRY_VIEW_CONTROLLER_H_
+
+#import <UIKit/UIKit.h>
+
+// Contract to handle finalization for Pin Prompt
+@protocol PinEntryViewControllerDelegate<NSObject>
+
+// Returns with user's Pin. Pin has not been validated with the server yet.
+// |shouldPrompt| indicates whether a prompt should be needed for the next login
+// attempt with this host.
+- (void)connectToHostWithPin:(NSString*)hostPin shouldPrompt:(BOOL)shouldPrompt;
+
+// Returns when the user has cancelled the input, effectively closing the
+// connection attempt.
+- (void)cancelledConnectToHostWithPin;
+
+@end
+
+// Dialog for user's Pin input. If a host has |pairingSupported| then user has
+// the option to save a token for authentication.
+@interface PinEntryViewController : UIViewController<UITextFieldDelegate> {
+ @private
+ __weak IBOutlet UIView* _controlView;
+ __weak IBOutlet UIButton* _cancelButton;
+ __weak IBOutlet UIButton* _connectButton;
+ __weak IBOutlet UILabel* _host;
+ __weak IBOutlet UISwitch* _switchAskAgain;
+ __weak IBOutlet UILabel* _shouldSavePin;
+ __weak IBOutlet UITextField* _hostPin;
+}
+
+@property(weak, nonatomic) id<PinEntryViewControllerDelegate> delegate;
+@property(nonatomic, copy) NSString* hostName;
+@property(nonatomic) BOOL shouldPrompt;
+@property(nonatomic) BOOL pairingSupported;
+
+- (IBAction)buttonCancelClicked:(id)sender;
+- (IBAction)buttonConnectClicked:(id)sender;
+
+@end
+
+#endif // REMOTING_IOS_UI_PIN_ENTRY_VIEW_CONTROLLER_H_

Powered by Google App Engine
This is Rietveld 408576698