Search in sources :

Example 1 with CalledByNative

use of org.chromium.base.annotations.CalledByNative in project AndroidChromium by JackyAndroid.

the class LayerTitleCache method buildUpdatedTitle.

@CalledByNative
private void buildUpdatedTitle(int tabId) {
    if (mTabModelSelector == null)
        return;
    Tab tab = mTabModelSelector.getTabById(tabId);
    if (tab == null)
        return;
    getUpdatedTitle(tab, "");
}
Also used : Tab(org.chromium.chrome.browser.tab.Tab) CalledByNative(org.chromium.base.annotations.CalledByNative)

Example 2 with CalledByNative

use of org.chromium.base.annotations.CalledByNative in project AndroidChromium by JackyAndroid.

the class AutoSigninFirstRunDialog method createAndShowDialog.

@CalledByNative
private static AutoSigninFirstRunDialog createAndShowDialog(WindowAndroid windowAndroid, long nativeAutoSigninFirstRunDialog, String title, String explanation, int explanationLinkStart, int explanationLinkEnd, String okButtonText, String turnOffButtonText) {
    Activity activity = windowAndroid.getActivity().get();
    if (activity == null)
        return null;
    AutoSigninFirstRunDialog dialog = new AutoSigninFirstRunDialog(activity, nativeAutoSigninFirstRunDialog, title, explanation, explanationLinkStart, explanationLinkEnd, okButtonText, turnOffButtonText);
    dialog.show();
    return dialog;
}
Also used : Activity(android.app.Activity) CalledByNative(org.chromium.base.annotations.CalledByNative)

Example 3 with CalledByNative

use of org.chromium.base.annotations.CalledByNative in project AndroidChromium by JackyAndroid.

the class ConnectionInfoPopup method addResetCertDecisionsButton.

@CalledByNative
private void addResetCertDecisionsButton(String label) {
    assert mNativeConnectionInfoPopup != 0;
    assert mResetCertDecisionsButton == null;
    mResetCertDecisionsButton = new Button(mContext);
    mResetCertDecisionsButton.setText(label);
    mResetCertDecisionsButton.setBackgroundResource(R.drawable.connection_info_reset_cert_decisions);
    mResetCertDecisionsButton.setTextColor(ApiCompatibilityUtils.getColor(mContext.getResources(), R.color.connection_info_popup_reset_cert_decisions_button));
    mResetCertDecisionsButton.setTextSize(DESCRIPTION_TEXT_SIZE_SP);
    mResetCertDecisionsButton.setOnClickListener(this);
    LinearLayout container = new LinearLayout(mContext);
    container.setOrientation(LinearLayout.VERTICAL);
    container.addView(mResetCertDecisionsButton);
    container.setPadding(0, 0, 0, mPaddingWide);
    mContainer.addView(container);
}
Also used : Button(android.widget.Button) LinearLayout(android.widget.LinearLayout) CalledByNative(org.chromium.base.annotations.CalledByNative)

Example 4 with CalledByNative

use of org.chromium.base.annotations.CalledByNative in project AndroidChromium by JackyAndroid.

the class UsbChooserDialog method create.

@CalledByNative
private static UsbChooserDialog create(WindowAndroid windowAndroid, String origin, int securityLevel, long nativeUsbChooserDialogPtr) {
    Activity activity = windowAndroid.getActivity().get();
    if (activity == null) {
        return null;
    }
    UsbChooserDialog dialog = new UsbChooserDialog(nativeUsbChooserDialogPtr);
    dialog.show(activity, origin, securityLevel);
    return dialog;
}
Also used : Activity(android.app.Activity) CalledByNative(org.chromium.base.annotations.CalledByNative)

Example 5 with CalledByNative

use of org.chromium.base.annotations.CalledByNative in project AndroidChromium by JackyAndroid.

the class ChromeHttpAuthHandler method showDialog.

@CalledByNative
private void showDialog(WindowAndroid windowAndroid) {
    if (windowAndroid == null) {
        cancel();
    }
    Activity activity = windowAndroid.getActivity().get();
    if (activity == null) {
        cancel();
    }
    LoginPrompt authDialog = new LoginPrompt(activity, this);
    setAutofillObserver(authDialog);
    authDialog.show();
}
Also used : Activity(android.app.Activity) CalledByNative(org.chromium.base.annotations.CalledByNative)

Aggregations

CalledByNative (org.chromium.base.annotations.CalledByNative)79 Context (android.content.Context)13 Intent (android.content.Intent)12 Activity (android.app.Activity)11 CastMediaRouteProvider (org.chromium.chrome.browser.media.router.cast.CastMediaRouteProvider)8 DownloadNotifier (org.chromium.chrome.browser.download.DownloadNotifier)6 PackageManager (android.content.pm.PackageManager)5 Bitmap (android.graphics.Bitmap)5 View (android.view.View)5 TextView (android.widget.TextView)5 DownloadInfo (org.chromium.chrome.browser.download.DownloadInfo)5 SuppressLint (android.annotation.SuppressLint)4 Paint (android.graphics.Paint)4 ActivityManager (android.app.ActivityManager)3 Resources (android.content.res.Resources)3 ImageView (android.widget.ImageView)3 ScrollView (android.widget.ScrollView)3 File (java.io.File)3 VisibleForTesting (org.chromium.base.VisibleForTesting)3 Account (android.accounts.Account)2