Created
October 15, 2023 05:38
-
-
Save t4kemyh4nd/229afb439d4d1fe0ea6fa73f5a4f65ce to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void AddToHomescreenMediator::AddToHomescreen( | |
JNIEnv* env, | |
const JavaParamRef<jstring>& j_user_title) { | |
if (!params_ || GetWebContents() == nullptr) | |
return; | |
if (params_->app_type == AddToHomescreenParams::AppType::SHORTCUT) { | |
params_->shortcut_info->user_title = | |
base::android::ConvertJavaStringToUTF16(env, j_user_title); | |
} else if (params_->app_type == AddToHomescreenParams::AppType::WEBAPK) { | |
AppBannerManager* app_banner_manager = | |
AppBannerManager::FromWebContents(GetWebContents()); | |
app_banner_manager->TrackInstallPath(/* bottom_sheet= */ false, | |
params_->install_source); | |
} | |
AddToHomescreenInstaller::Install(GetWebContents(), *params_, | |
event_callback_); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment