Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(421)

Unified Diff: chrome/browser/android/webapps/add_to_homescreen_dialog_helper.cc

Issue 2138973002: Initial CL for talking to the WebAPK server to generate WebAPK (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'webapk_builder_impl0' into webapk_builder_impl2 Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/webapps/add_to_homescreen_dialog_helper.cc
diff --git a/chrome/browser/android/webapps/add_to_homescreen_dialog_helper.cc b/chrome/browser/android/webapps/add_to_homescreen_dialog_helper.cc
index bc55cb26db57533d4050e4ae37e0a09bc64cecdf..a55b3e481bebf23c7f8a0e7721bbcb4b8c920830 100644
--- a/chrome/browser/android/webapps/add_to_homescreen_dialog_helper.cc
+++ b/chrome/browser/android/webapps/add_to_homescreen_dialog_helper.cc
@@ -39,12 +39,14 @@ AddToHomescreenDialogHelper::AddToHomescreenDialogHelper(
jobject obj,
content::WebContents* web_contents)
: add_shortcut_pending_(false),
- data_fetcher_(new AddToHomescreenDataFetcher(web_contents,
+ data_fetcher_(new AddToHomescreenDataFetcher(
+ web_contents,
ShortcutHelper::GetIdealHomescreenIconSizeInDp(),
ShortcutHelper::GetMinimumHomescreenIconSizeInDp(),
ShortcutHelper::GetIdealSplashImageSizeInDp(),
ShortcutHelper::GetMinimumSplashImageSizeInDp(),
- this)) {
+ this)),
+ browser_context_(web_contents->GetBrowserContext()) {
java_ref_.Reset(env, obj);
}
@@ -122,8 +124,8 @@ void AddToHomescreenDialogHelper::AddShortcut(const ShortcutInfo& info,
const std::string& uid = base::GenerateGUID();
content::BrowserThread::PostTask(
content::BrowserThread::IO, FROM_HERE,
- base::Bind(&ShortcutHelper::AddShortcutInBackgroundWithSkBitmap, info,
- uid, icon,
+ base::Bind(&ShortcutHelper::AddShortcutInBackgroundWithSkBitmap,
+ browser_context_, info, uid, icon,
data_fetcher_->FetchSplashScreenImageCallback(uid)));
}

Powered by Google App Engine
This is Rietveld 408576698