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

Side by Side Diff: chrome/browser/android/banners/app_banner_infobar_delegate_android.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 'master' into webapk_builder_impl22_no_content Created 4 years, 4 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
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/android/shortcut_helper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 255
256 ShortcutInfo info(GURL::EmptyGURL()); 256 ShortcutInfo info(GURL::EmptyGURL());
257 info.UpdateFromManifest(manifest_); 257 info.UpdateFromManifest(manifest_);
258 info.manifest_url = manifest_url_; 258 info.manifest_url = manifest_url_;
259 info.icon_url = app_icon_url_; 259 info.icon_url = app_icon_url_;
260 info.UpdateSource(ShortcutInfo::SOURCE_APP_BANNER); 260 info.UpdateSource(ShortcutInfo::SOURCE_APP_BANNER);
261 261
262 const std::string& uid = base::GenerateGUID(); 262 const std::string& uid = base::GenerateGUID();
263 content::BrowserThread::PostTask( 263 content::BrowserThread::PostTask(
264 content::BrowserThread::IO, FROM_HERE, 264 content::BrowserThread::IO, FROM_HERE,
265 base::Bind(&ShortcutHelper::AddToLauncherInBackgroundWithSkBitmap, info, 265 base::Bind(&ShortcutHelper::AddToLauncherInBackgroundWithSkBitmap,
266 uid, *app_icon_.get(), 266 web_contents->GetBrowserContext(), info, uid,
267 *app_icon_.get(),
267 data_fetcher_->FetchWebappSplashScreenImageCallback(uid))); 268 data_fetcher_->FetchWebappSplashScreenImageCallback(uid)));
268 269
269 SendBannerAccepted(web_contents, "web"); 270 SendBannerAccepted(web_contents, "web");
270 return true; 271 return true;
271 } 272 }
272 273
273 return true; 274 return true;
274 } 275 }
275 276
276 bool AppBannerInfoBarDelegateAndroid::LinkClicked( 277 bool AppBannerInfoBarDelegateAndroid::LinkClicked(
(...skipping 20 matching lines...) Expand all
297 298
298 TrackDismissEvent(DISMISS_EVENT_BANNER_CLICK); 299 TrackDismissEvent(DISMISS_EVENT_BANNER_CLICK);
299 return true; 300 return true;
300 } 301 }
301 302
302 bool RegisterAppBannerInfoBarDelegateAndroid(JNIEnv* env) { 303 bool RegisterAppBannerInfoBarDelegateAndroid(JNIEnv* env) {
303 return RegisterNativesImpl(env); 304 return RegisterNativesImpl(env);
304 } 305 }
305 306
306 } // namespace banners 307 } // namespace banners
OLDNEW
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/android/shortcut_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698