org.chromium.base.annotations.UsedByReflection Java Examples

The following examples show how to use org.chromium.base.annotations.UsedByReflection. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: VrShellImpl.java    From AndroidChromium with Apache License 2.0 6 votes vote down vote up
@UsedByReflection("VrShellDelegate.java")
public VrShellImpl(Activity activity) {
    super(activity);
    mActivity = activity;
    mContentViewCoreContainer = new FrameLayout(getContext()) {
        @Override
        public boolean dispatchTouchEvent(MotionEvent event) {
            return true;
        }
    };
    addView(mContentViewCoreContainer, 0, new FrameLayout.LayoutParams(
            FrameLayout.LayoutParams.MATCH_PARENT,
            FrameLayout.LayoutParams.MATCH_PARENT));
    mGlSurfaceView = new GLSurfaceView(getContext());
    mGlSurfaceView.setEGLContextClientVersion(2);
    mGlSurfaceView.setEGLConfigChooser(8, 8, 8, 8, 0, 0);
    mGlSurfaceView.setPreserveEGLContextOnPause(true);
    mGlSurfaceView.setRenderer(this);
    setPresentationView(mGlSurfaceView);

    if (setAsyncReprojectionEnabled(true)) {
        AndroidCompat.setSustainedPerformanceMode(mActivity, true);
    }
}
 
Example #2
Source File: PiiElider.java    From cronet with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * Elides any URL in the exception messages contained inside a stacktrace with
 * {@link #URL_ELISION}.
 *
 * @param stacktrace Multiline stacktrace as a string.
 * @return Stacktrace with elided URLs.
 */
@UsedByReflection("jni_android.cc")
public static String sanitizeStacktrace(String stacktrace) {
    String[] frames = stacktrace.split("\\n");
    // Sanitize first stacktrace line which contains the exception message.
    frames[0] = elideUrl(frames[0]);
    for (int i = 1; i < frames.length; i++) {
        // Nested exceptions should also have their message sanitized.
        if (frames[i].startsWith("Caused by:")) {
            frames[i] = elideUrl(frames[i]);
        }
    }
    return TextUtils.join("\n", frames);
}
 
Example #3
Source File: ProxyChangeListener.java    From cronet with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Override
@UsedByReflection("WebView embedders call this to override proxy settings")
public void onReceive(Context context, final Intent intent) {
    if (intent.getAction().equals(Proxy.PROXY_CHANGE_ACTION)) {
        runOnThread(new Runnable() {
            @Override
            public void run() {
                proxySettingsChanged(ProxyReceiver.this, extractNewProxy(intent));
            }
        });
    }
}
 
Example #4
Source File: CronetUrlRequestContext.java    From cronet with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@UsedByReflection("CronetEngine.java")
public CronetUrlRequestContext(final CronetEngineBuilderImpl builder) {
    mNetworkQualityEstimatorEnabled = builder.networkQualityEstimatorEnabled();
    CronetLibraryLoader.ensureInitialized(builder.getContext(), builder);
    if (!IntegratedModeState.INTEGRATED_MODE_ENABLED) {
        nativeSetMinLogLevel(getLoggingLevel());
    }
    if (builder.httpCacheMode() == HttpCacheType.DISK) {
        mInUseStoragePath = builder.storagePath();
        synchronized (sInUseStoragePaths) {
            if (!sInUseStoragePaths.add(mInUseStoragePath)) {
                throw new IllegalStateException("Disk cache storage path already in use");
            }
        }
    } else {
        mInUseStoragePath = null;
    }
    synchronized (mLock) {
        mUrlRequestContextAdapter =
                nativeCreateRequestContextAdapter(createNativeUrlRequestContextConfig(builder));
        if (mUrlRequestContextAdapter == 0) {
            throw new NullPointerException("Context Adapter creation failed.");
        }
        mHostResolver = builder.hostResolver();
    }

    // Init native Chromium URLRequestContext on init thread.
    CronetLibraryLoader.postToInitThread(new Runnable() {
        @Override
        public void run() {
            CronetLibraryLoader.ensureInitializedOnInitThread();
            synchronized (mLock) {
                // mUrlRequestContextAdapter is guaranteed to exist until
                // initialization on init and network threads completes and
                // initNetworkThread is called back on network thread.
                nativeInitRequestContextOnInitThread(mUrlRequestContextAdapter);
            }
        }
    });
}
 
Example #5
Source File: AccessibilityTabModelListItem.java    From 365browser with Apache License 2.0 5 votes vote down vote up
/**
 * This call is exposed for the benefit of the animators.
 *
 * @param height The height of the current view.
 */
@SuppressLint("AnimatorKeep")
@UsedByReflection("")
public void setHeight(int height) {
    AbsListView.LayoutParams params = (AbsListView.LayoutParams) getLayoutParams();
    if (params == null) {
        params = new AbsListView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, height);
    } else {
        if (params.height == height) return;
        params.height = height;
    }
    setLayoutParams(params);
}
 
Example #6
Source File: NonPresentingGvrContextImpl.java    From AndroidChromium with Apache License 2.0 4 votes vote down vote up
@UsedByReflection("VrShellDelegate.java")
public NonPresentingGvrContextImpl(Activity activity) {
    mGvrLayout = new GvrLayout(activity);
}
 
Example #7
Source File: VrDaydreamApiImpl.java    From AndroidChromium with Apache License 2.0 4 votes vote down vote up
@UsedByReflection("VrShellDelegate.java")
public VrDaydreamApiImpl(Activity activity) {
    mActivity = activity;
}
 
Example #8
Source File: VrCoreVersionCheckerImpl.java    From AndroidChromium with Apache License 2.0 4 votes vote down vote up
@UsedByReflection("VrShellDelegate.java")
public VrCoreVersionCheckerImpl() {
}
 
Example #9
Source File: CompositorSurfaceManager.java    From 365browser with Apache License 2.0 4 votes vote down vote up
@UsedByReflection("Android")
public void surfaceRedrawNeededAsync(SurfaceHolder holder, Runnable drawingFinished) {
    mClient.surfaceRedrawNeededAsync(holder, drawingFinished);
}
 
Example #10
Source File: VrClassesWrapperImpl.java    From 365browser with Apache License 2.0 4 votes vote down vote up
@UsedByReflection("VrShellDelegate.java")
public VrClassesWrapperImpl() {}
 
Example #11
Source File: ChildProcessServiceImpl.java    From 365browser with Apache License 2.0 4 votes vote down vote up
@UsedByReflection("WebApkSandboxedProcessService")
public ChildProcessServiceImpl() {
    KillChildUncaughtExceptionHandler.maybeInstallHandler();
}
 
Example #12
Source File: ChildProcessServiceImpl.java    From 365browser with Apache License 2.0 4 votes vote down vote up
@UsedByReflection("WebApkSandboxedProcessService")
public IBinder bind(Intent intent, int authorizedCallerUid) {
    mAuthorizedCallerUid = authorizedCallerUid;
    initializeParams(intent);
    return mBinder;
}
 
Example #13
Source File: NativeCronetProvider.java    From cronet with BSD 3-Clause "New" or "Revised" License 2 votes vote down vote up
/**
 * Constructor.
 *
 * @param context Android context to use.
 */
@UsedByReflection("CronetProvider.java")
public NativeCronetProvider(Context context) {
    super(context);
}
 
Example #14
Source File: SmartClipProvider.java    From 365browser with Apache License 2.0 2 votes vote down vote up
/**
 * Initiate extraction of text, HTML, and other information for clipping puposes (smart clip)
 * from the rectangle area defined by starting positions (x and y), and width and height.
 */
@UsedByReflection("ExternalOemSupport")
void extractSmartClipData(int x, int y, int width, int height);
 
Example #15
Source File: SmartClipProvider.java    From 365browser with Apache License 2.0 2 votes vote down vote up
/**
 * Register a handler to handle smart clip data once extraction is done.
 */
@UsedByReflection("ExternalOemSupport")
void setSmartClipResultHandler(final Handler resultHandler);