Skip to content

Commit 9713b63

Browse files
mdvaccafacebook-github-bot
authored andcommitted
Introducing ReactCallerContextFactory interface
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
1 parent b3439a2 commit 9713b63

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Copyright (c) Facebook, Inc. and its affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
package com.facebook.react.views.image;
9+
10+
import com.facebook.react.uimanager.ThemedReactContext;
11+
12+
/**
13+
* This interface is used from {@link ReactImageManager} to customize the CallerContext object
14+
* associated with each instance of {@link ReactImageView}.
15+
*/
16+
public interface ReactCallerContextFactory {
17+
18+
/**
19+
* This method will be called at the time {@link ReactImageManager} creates {@link ReactImageView}
20+
*
21+
* @param reactContext {@link ThemedReactContext} used to create the {@link ReactImageView}
22+
* @return an {@link Object} that represents the CallerContext.
23+
*/
24+
Object getOrCreateCallerContext(ThemedReactContext reactContext);
25+
}

0 commit comments

Comments
 (0)