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

Side by Side Diff: chrome/browser/android/webapps/add_to_homescreen_manager.cc

Issue 2808263004: Add a new WebAPK-specific app banner shortcut source. (Closed)
Patch Set: Rebase Created 3 years, 7 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/android/shortcut_info.h ('k') | tools/metrics/histograms/enums.xml » ('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/webapps/add_to_homescreen_manager.h" 5 #include "chrome/browser/android/webapps/add_to_homescreen_manager.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/location.h" 9 #include "base/location.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 void AddToHomescreenManager::CreateInfoBarForWebApk( 189 void AddToHomescreenManager::CreateInfoBarForWebApk(
190 const ShortcutInfo& info, 190 const ShortcutInfo& info,
191 const SkBitmap& primary_icon, 191 const SkBitmap& primary_icon,
192 const SkBitmap& badge_icon) { 192 const SkBitmap& badge_icon) {
193 content::WebContents* web_contents = data_fetcher_->web_contents(); 193 content::WebContents* web_contents = data_fetcher_->web_contents();
194 banners::AppBannerManagerAndroid* app_banner_manager = 194 banners::AppBannerManagerAndroid* app_banner_manager =
195 banners::AppBannerManagerAndroid::FromWebContents(web_contents); 195 banners::AppBannerManagerAndroid::FromWebContents(web_contents);
196 banners::AppBannerInfoBarDelegateAndroid::Create( 196 banners::AppBannerInfoBarDelegateAndroid::Create(
197 web_contents, app_banner_manager->GetWeakPtr(), info.user_title, 197 web_contents, app_banner_manager->GetWeakPtr(), info.user_title,
198 base::MakeUnique<ShortcutInfo>(info), primary_icon, badge_icon, 198 base::MakeUnique<ShortcutInfo>(info), primary_icon, badge_icon,
199 -1 /* event_request_id */, webapk::INSTALL_SOURCE_MENU); 199 -1 /* event_request_id */, true /* is_webapk */,
200 webapk::INSTALL_SOURCE_MENU);
200 } 201 }
201 202
202 SkBitmap AddToHomescreenManager::FinalizeLauncherIconInBackground( 203 SkBitmap AddToHomescreenManager::FinalizeLauncherIconInBackground(
203 const SkBitmap& bitmap, 204 const SkBitmap& bitmap,
204 const GURL& url, 205 const GURL& url,
205 bool* is_generated) { 206 bool* is_generated) {
206 DCHECK(content::BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread()); 207 DCHECK(content::BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread());
207 208
208 return ShortcutHelper::FinalizeLauncherIconInBackground(bitmap, url, 209 return ShortcutHelper::FinalizeLauncherIconInBackground(bitmap, url,
209 is_generated); 210 is_generated);
210 } 211 }
OLDNEW
« no previous file with comments | « chrome/browser/android/shortcut_info.h ('k') | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698