Skip to content

Commit

Permalink
Introducing ReactCallerContextFactory interface
Browse files Browse the repository at this point in the history
Summary:
This interface is used from ReactImageManager to customize the CallerContext object associated with each instance of ReactImageView.
CallerContext are used on Fresco to customize Debug and logs

Changelog: Introduce ReactCallerContextFactory interface, this interface is intended to customize Debug and logging on Fresco

Reviewed By: JoshuaGross

Differential Revision: D18474017

fbshipit-source-id: eda0fc9d3f64bbcc23ee1b7f5d779b441da1fe6c
  • Loading branch information
mdvacca authored and facebook-github-bot committed Nov 15, 2019
1 parent b3439a2 commit 9713b63
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.react.views.image;

import com.facebook.react.uimanager.ThemedReactContext;

/**
* This interface is used from {@link ReactImageManager} to customize the CallerContext object
* associated with each instance of {@link ReactImageView}.
*/
public interface ReactCallerContextFactory {

/**
* This method will be called at the time {@link ReactImageManager} creates {@link ReactImageView}
*
* @param reactContext {@link ThemedReactContext} used to create the {@link ReactImageView}
* @return an {@link Object} that represents the CallerContext.
*/
Object getOrCreateCallerContext(ThemedReactContext reactContext);
}

0 comments on commit 9713b63

Please sign in to comment.