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

Unified Diff: remoting/client/ios/app/client_connection_view_controller.h

Issue 2846603002: Updating Pin Entry View and creating Connection Status View. (Closed)
Patch Set: Use viewWillLayoutSubviews. Created 3 years, 8 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
« no previous file with comments | « remoting/client/ios/app/BUILD.gn ('k') | remoting/client/ios/app/client_connection_view_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/ios/app/client_connection_view_controller.h
diff --git a/remoting/client/ios/app/client_connection_view_controller.h b/remoting/client/ios/app/client_connection_view_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..29f5e1f9d7510ffd9187654238f08fb91d3b1fe9
--- /dev/null
+++ b/remoting/client/ios/app/client_connection_view_controller.h
@@ -0,0 +1,46 @@
+// Copyright 2017 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_CLIENT_IOS_APP_CLIENT_CONNECTION_VIEW_CONTROLLER_H_
+#define REMOTING_CLIENT_IOS_APP_CLIENT_CONNECTION_VIEW_CONTROLLER_H_
+
+#import <UIKit/UIKit.h>
+
+// This enumerated the differnt modes this Client Connection View can be in.
+typedef NS_ENUM(NSInteger, ClientConnectionViewState) {
+ ClientViewConnecting,
+ ClientViewPinPrompt,
+ ClientViewConnected,
+};
+
+// The host connection view controller delegate provides feedback for state
+// changes on Host Connection that the calling view should respond to.
+@protocol ClientConnectionViewControllerDelegate<NSObject>
+
+// Notifies the delegate the client is connected to the host.
+- (void)clientConnected;
+
+// Gets the current host name the client is attempting to connect to.
+- (NSString*)getConnectingHostName;
+
+@end
+
+// This is the view that shows the user feedback while the client connection is
+// being established. If requested the view can also display the pin entry view.
+// State communication for this view is handled by NSNotifications, it listens
+// to kHostSessionStatusChanged events on the default NSNotificationCenter.
+// Internally the notification is tied to [self setState] so view setup will
+// work the same way if state is set directly.
+@interface ClientConnectionViewController : UIViewController
+
+// Setting state will change the view
+@property(nonatomic, assign) ClientConnectionViewState state;
+
+// This delegate is used to ask for Host Name and to notify when the connection
+// has been established.
+@property(weak, nonatomic) id<ClientConnectionViewControllerDelegate> delegate;
+
+@end
+
+#endif // REMOTING_CLIENT_IOS_APP_CLIENT_CONNECTION_VIEW_CONTROLLER_H_
« no previous file with comments | « remoting/client/ios/app/BUILD.gn ('k') | remoting/client/ios/app/client_connection_view_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698