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

Unified Diff: remoting/ios/app/remoting_resource_factory.mm

Issue 2937733003: [CRD iOS] Branching internal and external implementations (Closed)
Patch Set: Merge w/ ToT Created 3 years, 6 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/app/remoting_resource_factory.mm
diff --git a/remoting/ios/app/remoting_resource_factory.mm b/remoting/ios/app/remoting_resource_factory.mm
new file mode 100644
index 0000000000000000000000000000000000000000..dd2135cd942ff4a105a3d06bc6aacd3ce667b8b4
--- /dev/null
+++ b/remoting/ios/app/remoting_resource_factory.mm
@@ -0,0 +1,41 @@
+// 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.h"
+
+#include "base/logging.h"
+
+static RemotingResourceFactory* defaultResourceFactory = nil;
+
+@implementation RemotingResourceFactory
+
+- (UIViewController*)wrapRootViewController:(UIViewController*)controller {
+ [NSException
+ raise:NSInternalInconsistencyException
+ format:@"Subclass must override the wrapRootViewController: method"];
+ return nil;
+}
+
+- (void)presentMenuOnController:(UIViewController*)controller {
+ [NSException
+ raise:NSInternalInconsistencyException
+ format:@"Subclass must override the presentMenuOnController: method"];
+}
+
+#pragma mark - Class Property
+
++ (RemotingResourceFactory*)defaultFactory {
+ DCHECK(defaultResourceFactory != nil) << "defaultFactory has never been set.";
+ return defaultResourceFactory;
+}
+
++ (void)setDefaultFactory:(RemotingResourceFactory*)factory {
+ defaultResourceFactory = factory;
+}
+
+@end

Powered by Google App Engine
This is Rietveld 408576698