OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 6 #error "This file requires ARC support." |
| 7 #endif |
| 8 |
| 9 #import "remoting/ios/app/remoting_resource_factory.h" |
| 10 |
| 11 #include "base/logging.h" |
| 12 |
| 13 static RemotingResourceFactory* defaultResourceFactory = nil; |
| 14 |
| 15 @implementation RemotingResourceFactory |
| 16 |
| 17 - (UIViewController*)wrapRootViewController:(UIViewController*)controller { |
| 18 [NSException |
| 19 raise:NSInternalInconsistencyException |
| 20 format:@"Subclass must override the wrapRootViewController: method"]; |
| 21 return nil; |
| 22 } |
| 23 |
| 24 - (void)presentMenuOnController:(UIViewController*)controller { |
| 25 [NSException |
| 26 raise:NSInternalInconsistencyException |
| 27 format:@"Subclass must override the presentMenuOnController: method"]; |
| 28 } |
| 29 |
| 30 #pragma mark - Class Property |
| 31 |
| 32 + (RemotingResourceFactory*)defaultFactory { |
| 33 DCHECK(defaultResourceFactory != nil) << "defaultFactory has never been set."; |
| 34 return defaultResourceFactory; |
| 35 } |
| 36 |
| 37 + (void)setDefaultFactory:(RemotingResourceFactory*)factory { |
| 38 defaultResourceFactory = factory; |
| 39 } |
| 40 |
| 41 @end |
OLD | NEW |