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

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

Issue 2915913002: [WebAPKs] Display same text for menu & engagement banner (Closed)
Patch Set: Merge branch 'same_infobar_title0' into same_infobar_title Created 3 years, 6 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/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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 } 187 }
188 188
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(),
198 base::MakeUnique<ShortcutInfo>(info), primary_icon, badge_icon, 198 base::MakeUnique<ShortcutInfo>(info), primary_icon, badge_icon,
199 -1 /* event_request_id */, true /* is_webapk */, 199 -1 /* event_request_id */, true /* is_webapk */,
200 webapk::INSTALL_SOURCE_MENU); 200 webapk::INSTALL_SOURCE_MENU);
201 } 201 }
202 202
203 SkBitmap AddToHomescreenManager::FinalizeLauncherIconInBackground( 203 SkBitmap AddToHomescreenManager::FinalizeLauncherIconInBackground(
204 const SkBitmap& bitmap, 204 const SkBitmap& bitmap,
205 const GURL& url, 205 const GURL& url,
206 bool* is_generated) { 206 bool* is_generated) {
207 base::ThreadRestrictions::AssertIOAllowed(); 207 base::ThreadRestrictions::AssertIOAllowed();
208 208
209 return ShortcutHelper::FinalizeLauncherIconInBackground(bitmap, url, 209 return ShortcutHelper::FinalizeLauncherIconInBackground(bitmap, url,
210 is_generated); 210 is_generated);
211 } 211 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698