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

Side by Side Diff: chrome/browser/android/banners/app_banner_infobar_delegate_android.cc

Issue 1845233002: Store standalone web app data in WebappDataStorage as well as the homescreen intent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@notification-deep-linking
Patch Set: Final nit Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/android/banners/app_banner_infobar_delegate_android.h" 5 #include "chrome/browser/android/banners/app_banner_infobar_delegate_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/guid.h" 9 #include "base/guid.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 AppBannerSettingsHelper::RecordBannerInstallEvent( 246 AppBannerSettingsHelper::RecordBannerInstallEvent(
247 web_contents, web_app_data_.start_url.spec(), 247 web_contents, web_app_data_.start_url.spec(),
248 AppBannerSettingsHelper::WEB); 248 AppBannerSettingsHelper::WEB);
249 249
250 ShortcutInfo info(GURL::EmptyGURL()); 250 ShortcutInfo info(GURL::EmptyGURL());
251 info.UpdateFromManifest(web_app_data_); 251 info.UpdateFromManifest(web_app_data_);
252 info.UpdateSource(ShortcutInfo::SOURCE_APP_BANNER); 252 info.UpdateSource(ShortcutInfo::SOURCE_APP_BANNER);
253 253
254 const std::string& uid = base::GenerateGUID(); 254 const std::string& uid = base::GenerateGUID();
255 content::BrowserThread::PostTask( 255 content::BrowserThread::PostTask(
256 content::BrowserThread::IO, 256 content::BrowserThread::IO, FROM_HERE,
257 FROM_HERE, 257 base::Bind(&ShortcutHelper::AddShortcutInBackgroundWithSkBitmap, info,
258 base::Bind(&ShortcutHelper::AddShortcutInBackgroundWithSkBitmap, 258 uid, *app_icon_.get(),
259 info, 259 data_fetcher_->FetchWebappSplashScreenImageCallback(uid)));
260 uid,
261 *app_icon_.get()));
262 data_fetcher_->FetchWebappSplashScreenImage(uid);
263 260
264 SendBannerAccepted(web_contents, "web"); 261 SendBannerAccepted(web_contents, "web");
265 return true; 262 return true;
266 } 263 }
267 264
268 return true; 265 return true;
269 } 266 }
270 267
271 bool AppBannerInfoBarDelegateAndroid::LinkClicked( 268 bool AppBannerInfoBarDelegateAndroid::LinkClicked(
272 WindowOpenDisposition disposition) { 269 WindowOpenDisposition disposition) {
(...skipping 19 matching lines...) Expand all
292 289
293 TrackDismissEvent(DISMISS_EVENT_BANNER_CLICK); 290 TrackDismissEvent(DISMISS_EVENT_BANNER_CLICK);
294 return true; 291 return true;
295 } 292 }
296 293
297 bool RegisterAppBannerInfoBarDelegateAndroid(JNIEnv* env) { 294 bool RegisterAppBannerInfoBarDelegateAndroid(JNIEnv* env) {
298 return RegisterNativesImpl(env); 295 return RegisterNativesImpl(env);
299 } 296 }
300 297
301 } // namespace banners 298 } // namespace banners
OLDNEW
« no previous file with comments | « chrome/browser/android/banners/app_banner_data_fetcher_android.cc ('k') | chrome/browser/android/shortcut_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698