Chromium Code Reviews| Index: remoting/ios/Chromoting/main.mm |
| diff --git a/remoting/ios/Chromoting/main.mm b/remoting/ios/Chromoting/main.mm |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d1ec152a2a13eb1e42bd7d7cb5d7738cad5888b0 |
| --- /dev/null |
| +++ b/remoting/ios/Chromoting/main.mm |
| @@ -0,0 +1,44 @@ |
| +// 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. |
| + |
| +#if !defined(__has_feature) || !__has_feature(objc_arc) |
| +#error "This file requires ARC support." |
| +#endif |
| + |
| +#import <UIKit/UIKit.h> |
| + |
| +#include "base/command_line.h" |
| +#include "base/at_exit.h" |
| +#include "media/base/yuv_convert.h" |
| +#include "net/socket/ssl_server_socket.h" |
| + |
| +#import "app_delegate.h" |
| + |
| +int main(int argc, char* argv[]) { |
| + // namespace google_apis, which has our clientid and client secrets, has some |
|
dcaiafa
2014/03/19 01:14:15
nit: Is this comment still relevant? If not, pleas
aboone
2014/03/21 16:42:07
Done.
|
| + // prerequsites, before it can be used. The next two steps fulfill these |
| + // prerequsites. |
| + |
| + // This class is designed to fullfill the dependents needs when it goes out of |
| + // scope and gets deconstructed |
| + base::AtExitManager exitManager; |
| + |
| + // Publicise the CommandLine |
| + CommandLine::Init(argc, argv); |
| + |
| + // Allows later decoding of video frames. |
| + media::InitializeCPUSpecificYUVConversions(); |
| + |
| + // Enable support for SSL server sockets, which must be done as early as |
| + // possible, preferably before any NSS SSL sockets (client or server) have |
| + // been created. |
| + // It's possible that the hosting process has already made use of SSL, in |
| + // which case, there may be a slight race. |
| + net::EnableSSLServerSockets(); |
| + |
| + @autoreleasepool { |
| + return UIApplicationMain( |
| + argc, argv, nil, NSStringFromClass([AppDelegate class])); |
| + } |
| +} |