Minor cleanup to make loader unaware of bridge

Summary: The loader should be a utility that stands alone. The bridge uses the loader, not the other way around.

Reviewed By: bnham

Differential Revision: D3546157

fbshipit-source-id: 91016afb629df1f8c83c8fca6f42649be0b046b0
This commit is contained in:
Adam Ernst 2016-07-12 05:13:34 -07:00 коммит произвёл Facebook Github Bot 6
Родитель c7a590655c
Коммит 3be8c957b0
2 изменённых файлов: 3 добавлений и 10 удалений

Просмотреть файл

@ -7,10 +7,10 @@
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*/ */
typedef void (^RCTSourceLoadBlock)(NSError *error, NSData *source, int64_t sourceLength);
@class RCTBridge; @class RCTBridge;
#import "RCTJavaScriptLoader.h"
@protocol RCTBridgeDelegate <NSObject> @protocol RCTBridgeDelegate <NSObject>
/** /**

Просмотреть файл

@ -9,8 +9,6 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import "RCTBridgeDelegate.h"
extern uint32_t const RCTRAMBundleMagicNumber; extern uint32_t const RCTRAMBundleMagicNumber;
extern NSString *const RCTJavaScriptLoaderErrorDomain; extern NSString *const RCTJavaScriptLoaderErrorDomain;
@ -25,13 +23,8 @@ NS_ENUM(NSInteger) {
RCTJavaScriptLoaderErrorCannotBeLoadedSynchronously = 1000, RCTJavaScriptLoaderErrorCannotBeLoadedSynchronously = 1000,
}; };
@class RCTBridge; typedef void (^RCTSourceLoadBlock)(NSError *error, NSData *source, int64_t sourceLength);
/**
* Class that allows easy embedding, loading, life-cycle management of a
* JavaScript application inside of a native application.
* TODO: Incremental module loading. (low pri).
*/
@interface RCTJavaScriptLoader : NSObject @interface RCTJavaScriptLoader : NSObject
+ (void)loadBundleAtURL:(NSURL *)scriptURL onComplete:(RCTSourceLoadBlock)onComplete; + (void)loadBundleAtURL:(NSURL *)scriptURL onComplete:(RCTSourceLoadBlock)onComplete;