Index: remoting/ios/app/remoting_resource_factory_external.mm |
diff --git a/remoting/ios/app/remoting_resource_factory_external.mm b/remoting/ios/app/remoting_resource_factory_external.mm |
new file mode 100644 |
index 0000000000000000000000000000000000000000..478173682e5a594c78b82bcd3ca81c70d5104f5b |
--- /dev/null |
+++ b/remoting/ios/app/remoting_resource_factory_external.mm |
@@ -0,0 +1,29 @@ |
+// Copyright 2016 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 "remoting/ios/app/remoting_resource_factory_external.h" |
+ |
+#import "remoting/ios/app/remoting_menu_view_controller.h" |
+ |
+@implementation RemotingResourceFactoryExternal |
+ |
+- (UIViewController*)wrapRootViewController:(UIViewController*)controller { |
+ // No need to wrap the controller. The external impl will just pop up a modal |
+ // menu. |
+ return controller; |
+} |
+ |
+- (void)presentMenuOnController:(UIViewController*)controller { |
+ RemotingMenuViewController* menuViewController = |
+ [[RemotingMenuViewController alloc] init]; |
+ [controller presentViewController:menuViewController |
+ animated:YES |
+ completion:nil]; |
+} |
+ |
+@end |