| OLD | NEW |
| 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 } | 169 } |
| 170 | 170 |
| 171 void AddToHomescreenManager::CreateInfoBarForWebApk( | 171 void AddToHomescreenManager::CreateInfoBarForWebApk( |
| 172 const ShortcutInfo& info, | 172 const ShortcutInfo& info, |
| 173 const SkBitmap& primary_icon, | 173 const SkBitmap& primary_icon, |
| 174 const SkBitmap& badge_icon) { | 174 const SkBitmap& badge_icon) { |
| 175 content::WebContents* web_contents = data_fetcher_->web_contents(); | 175 content::WebContents* web_contents = data_fetcher_->web_contents(); |
| 176 banners::AppBannerManagerAndroid* app_banner_manager = | 176 banners::AppBannerManagerAndroid* app_banner_manager = |
| 177 banners::AppBannerManagerAndroid::FromWebContents(web_contents); | 177 banners::AppBannerManagerAndroid::FromWebContents(web_contents); |
| 178 banners::AppBannerInfoBarDelegateAndroid::Create( | 178 banners::AppBannerInfoBarDelegateAndroid::Create( |
| 179 web_contents, app_banner_manager->GetWeakPtr(), info.user_title, | 179 web_contents, app_banner_manager->GetWeakPtr(), |
| 180 base::MakeUnique<ShortcutInfo>(info), primary_icon, badge_icon, | 180 base::MakeUnique<ShortcutInfo>(info), primary_icon, badge_icon, |
| 181 -1 /* event_request_id */, true /* is_webapk */, | 181 -1 /* event_request_id */, true /* is_webapk */, |
| 182 webapk::INSTALL_SOURCE_MENU); | 182 webapk::INSTALL_SOURCE_MENU); |
| 183 } | 183 } |
| 184 | 184 |
| 185 SkBitmap AddToHomescreenManager::FinalizeLauncherIconInBackground( | 185 SkBitmap AddToHomescreenManager::FinalizeLauncherIconInBackground( |
| 186 const SkBitmap& bitmap, | 186 const SkBitmap& bitmap, |
| 187 const GURL& url, | 187 const GURL& url, |
| 188 bool* is_generated) { | 188 bool* is_generated) { |
| 189 base::ThreadRestrictions::AssertIOAllowed(); | 189 base::ThreadRestrictions::AssertIOAllowed(); |
| 190 | 190 |
| 191 return ShortcutHelper::FinalizeLauncherIconInBackground(bitmap, url, | 191 return ShortcutHelper::FinalizeLauncherIconInBackground(bitmap, url, |
| 192 is_generated); | 192 is_generated); |
| 193 } | 193 } |
| OLD | NEW |