Fabric: Deletion of unused files

Summary: We don't use them anymore.

Reviewed By: fkgozali

Differential Revision: D8048545

fbshipit-source-id: c92aa9ca13ac31eaead87a0982ed613710b7af57
This commit is contained in:
Valentin Shergin 2018-05-18 21:58:16 -07:00 committed by Facebook Github Bot
parent 85fc98d437
commit 06b0dabaa7
5 changed files with 0 additions and 223 deletions

View File

@ -1,46 +0,0 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <memory>
#include <fabric/uimanager/IFabricPlatformUIOperationManager.h>
@class RCTFabricPlatformUIOperationManager;
namespace facebook {
namespace react {
/**
* Connector class (from C++ to ObjC++) to allow FabricUIManager to invoke native UI operations/updates.
* UIKit-related impl doesn't live here, but this class gets passed to the FabricUIManager C++ impl directly.
*/
class RCTFabricPlatformUIOperationManagerConnector : public IFabricPlatformUIOperationManager {
public:
RCTFabricPlatformUIOperationManagerConnector();
virtual ~RCTFabricPlatformUIOperationManagerConnector();
void performUIOperation();
private:
void *self_;
RCTFabricPlatformUIOperationManager *manager_;
};
} // namespace react
} // namespace facebook
/**
* Actual ObjC++ implementation of the UI operations.
*/
@interface RCTFabricPlatformUIOperationManager : NSObject
- (void)performUIOperation;
@end

View File

@ -1,48 +0,0 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import "RCTFabricPlatformUIOperationManager.h"
namespace facebook {
namespace react {
RCTFabricPlatformUIOperationManagerConnector::RCTFabricPlatformUIOperationManagerConnector() {
self_ = (__bridge_retained void *)[RCTFabricPlatformUIOperationManager new];
manager_ = (__bridge RCTFabricPlatformUIOperationManager *)self_;
}
RCTFabricPlatformUIOperationManagerConnector::~RCTFabricPlatformUIOperationManagerConnector() {
CFRelease(self_);
self_ = NULL;
manager_ = NULL;
}
void RCTFabricPlatformUIOperationManagerConnector::performUIOperation() {
[manager_ performUIOperation];
}
} // namespace react
} // namespace facebook
// -----------------------------------------------------------------------------
// Start of ObjC++ impl
// Access UIKit here.
// -----------------------------------------------------------------------------
@implementation RCTFabricPlatformUIOperationManager
- (void)dealloc
{
NSLog(@"RCTFabricPlatformUIOperationManager: dealloc()");
}
- (void)performUIOperation
{
// TODO
NSLog(@"RCTFabricPlatformUIOperationManager: performUIOperation()");
}
@end

View File

@ -1,44 +0,0 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <UIKit/UIKit.h>
#import <memory>
#import <React/RCTBridge.h>
#import <React/RCTInvalidating.h>
#import <React/RCTShadowView.h>
namespace facebook {
namespace react {
class FabricUIManager;
} // namespace react
} // namespace facebook
using namespace facebook::react;
/**
* An ObjC++ wrapper around the C++ FabricUIManager instance, so that the RCTCxxBridge can access it as needed.
*/
@interface RCTFabricUIManagerWrapper : NSObject <RCTInvalidating>
- (std::shared_ptr<FabricUIManager>)manager;
@end
@interface RCTBridge (RCTFabricUIManagerWrapper)
/**
* To access via the bridge:
*
* std::shared_ptr<FabricUIManager> fabricUIManager = [_bridge fabricUIManager];
*/
- (std::shared_ptr<FabricUIManager>)fabricUIManager;
@end

View File

@ -1,62 +0,0 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import "RCTFabricUIManagerWrapper.h"
#include <fabric/uimanager/ComponentDescriptorRegistry.h>
#include <fabric/uimanager/FabricUIManager.h>
#include <fabric/view/ViewComponentDescriptor.h>
#include <folly/dynamic.h>
#include <folly/json.h>
#import "RCTFabricPlatformUIOperationManager.h"
// This file contains experimental placeholders, nothing is finalized.
@implementation RCTFabricUIManagerWrapper
{
std::shared_ptr<FabricUIManager> _manager;
std::shared_ptr<IFabricPlatformUIOperationManager> _platformUIOperationManager;
}
- (instancetype)init
{
self = [super init];
if (self) {
_platformUIOperationManager = std::make_shared<RCTFabricPlatformUIOperationManagerConnector>();
auto componentDescriptorRegistry = std::make_shared<ComponentDescriptorRegistry>();
SharedComponentDescriptor viewComponentDescriptor = std::make_shared<ViewComponentDescriptor>();
componentDescriptorRegistry->registerComponentDescriptor(viewComponentDescriptor);
_manager = std::make_shared<FabricUIManager>(componentDescriptorRegistry);
}
return self;
}
- (std::shared_ptr<FabricUIManager>)manager
{
return _manager;
}
- (void)invalidate
{
}
@end
@implementation RCTBridge (RCTFabricUIManagerWrapper)
- (std::shared_ptr<FabricUIManager>)fabricUIManager
{
RCTFabricUIManagerWrapper *wrapper = [self jsBoundExtraModuleForClass:[RCTFabricUIManagerWrapper class]];
if (wrapper) {
return [wrapper manager];
}
return nullptr;
}
@end

View File

@ -1,23 +0,0 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
namespace facebook {
namespace react {
/**
* An interface for FabricUIManager to perform platform-specific UI operations, like updating native UIView's in iOS.
*/
class IFabricPlatformUIOperationManager {
public:
// TODO: add meaningful methods
virtual void performUIOperation() = 0;
};
} // namespace react
} // namespace facebook