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

Side by Side Diff: chrome/browser/android/webapk/webapk_update_data_fetcher.cc

Issue 2949993002: Don't ignore manifest icons for sites that don't have a service worker. (Closed)
Patch Set: Comments Created 3 years, 5 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 | « no previous file | chrome/browser/android/webapps/add_to_homescreen_data_fetcher.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/webapk/webapk_update_data_fetcher.h" 5 #include "chrome/browser/android/webapk/webapk_update_data_fetcher.h"
6 6
7 #include <jni.h> 7 #include <jni.h>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/android/jni_array.h" 10 #include "base/android/jni_array.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 ShortcutHelper::GetIdealHomescreenIconSizeInPx(); 114 ShortcutHelper::GetIdealHomescreenIconSizeInPx();
115 params.minimum_primary_icon_size_in_px = 115 params.minimum_primary_icon_size_in_px =
116 ShortcutHelper::GetMinimumHomescreenIconSizeInPx(); 116 ShortcutHelper::GetMinimumHomescreenIconSizeInPx();
117 params.ideal_badge_icon_size_in_px = 117 params.ideal_badge_icon_size_in_px =
118 ShortcutHelper::GetIdealBadgeIconSizeInPx(); 118 ShortcutHelper::GetIdealBadgeIconSizeInPx();
119 params.minimum_badge_icon_size_in_px = 119 params.minimum_badge_icon_size_in_px =
120 ShortcutHelper::GetIdealBadgeIconSizeInPx(); 120 ShortcutHelper::GetIdealBadgeIconSizeInPx();
121 params.check_installable = true; 121 params.check_installable = true;
122 params.fetch_valid_primary_icon = true; 122 params.fetch_valid_primary_icon = true;
123 params.fetch_valid_badge_icon = true; 123 params.fetch_valid_badge_icon = true;
124 InstallableManager::CreateForWebContents(web_contents());
125 InstallableManager* installable_manager = 124 InstallableManager* installable_manager =
126 InstallableManager::FromWebContents(web_contents()); 125 InstallableManager::FromWebContents(web_contents());
127 installable_manager->GetData( 126 installable_manager->GetData(
128 params, base::Bind(&WebApkUpdateDataFetcher::OnDidGetInstallableData, 127 params, base::Bind(&WebApkUpdateDataFetcher::OnDidGetInstallableData,
129 weak_ptr_factory_.GetWeakPtr())); 128 weak_ptr_factory_.GetWeakPtr()));
130 } 129 }
131 130
132 void WebApkUpdateDataFetcher::OnDidGetInstallableData( 131 void WebApkUpdateDataFetcher::OnDidGetInstallableData(
133 const InstallableData& data) { 132 const InstallableData& data) {
134 // Determine whether or not the manifest is WebAPK-compatible. There are 3 133 // Determine whether or not the manifest is WebAPK-compatible. There are 3
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 info_.theme_color, info_.background_color); 239 info_.theme_color, info_.background_color);
241 } 240 }
242 241
243 void WebApkUpdateDataFetcher::OnWebManifestNotWebApkCompatible() { 242 void WebApkUpdateDataFetcher::OnWebManifestNotWebApkCompatible() {
244 if (!is_initial_fetch_) 243 if (!is_initial_fetch_)
245 return; 244 return;
246 245
247 Java_WebApkUpdateDataFetcher_onWebManifestForInitialUrlNotWebApkCompatible( 246 Java_WebApkUpdateDataFetcher_onWebManifestForInitialUrlNotWebApkCompatible(
248 base::android::AttachCurrentThread(), java_ref_); 247 base::android::AttachCurrentThread(), java_ref_);
249 } 248 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698