| Index: remoting/ios/app/app_delegate.mm
|
| diff --git a/remoting/ios/app/app_delegate.mm b/remoting/ios/app/app_delegate.mm
|
| index d6c87e00505ca54eb8cfa034a36f6a4a2349a20f..5ad9c55e00741fb92aa5cbb1cb28811fe84eec66 100644
|
| --- a/remoting/ios/app/app_delegate.mm
|
| +++ b/remoting/ios/app/app_delegate.mm
|
| @@ -8,10 +8,12 @@
|
|
|
| #import "remoting/ios/app/app_delegate.h"
|
|
|
| +#include "base/i18n/icu_util.h"
|
| #include "base/logging.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
| #include "ui/base/resource/resource_bundle.h"
|
|
|
| +#import "remoting/ios/app/panel_view_controller.h"
|
| #import "remoting/ios/app/remoting_view_controller.h"
|
| #import "remoting/ios/facade/remoting_authentication.h"
|
| #import "remoting/ios/facade/remoting_service.h"
|
| @@ -22,6 +24,17 @@
|
|
|
| - (BOOL)application:(UIApplication*)application
|
| willFinishLaunchingWithOptions:(NSDictionary*)launchOptions {
|
| + // Extra initializations needed when launching the app.
|
| +
|
| + // Required to find the ICU data file, used by some file_util routines.
|
| + base::i18n::InitializeICU();
|
| +
|
| +#ifdef DEBUG
|
| + // Set min log level for debug builds. For some reason this has to be
|
| + // negative.
|
| + logging::SetMinLogLevel(-1);
|
| +#endif
|
| +
|
| self.window =
|
| [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
|
| self.window.backgroundColor = [UIColor whiteColor];
|
| @@ -53,12 +66,27 @@
|
| return YES;
|
| }
|
|
|
| +#pragma mark - Properties
|
| +
|
| +- (UIViewController<PanelViewController>*)rootViewController {
|
| + return (UIViewController<PanelViewController>*)self.window.rootViewController;
|
| +}
|
| +
|
| ++ (AppDelegate*)currentDelegate {
|
| + return (AppDelegate*)UIApplication.sharedApplication.delegate;
|
| +}
|
| +
|
| +#pragma mark - Private
|
| +
|
| - (void)launchRemotingViewController {
|
| RemotingViewController* vc = [[RemotingViewController alloc] init];
|
| UINavigationController* navController =
|
| [[UINavigationController alloc] initWithRootViewController:vc];
|
| navController.navigationBarHidden = true;
|
| - self.window.rootViewController = navController;
|
| + UIViewController<PanelViewController>* rootVC =
|
| + [PanelViewControllerFactory createController];
|
| + rootVC.mainViewController = navController;
|
| + self.window.rootViewController = rootVC;
|
| [self.window makeKeyAndVisible];
|
| }
|
|
|
|
|