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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java

Issue 1893513002: Remove the first launch from home screen requirement for notification deep linking. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 8 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/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java » ('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 package org.chromium.chrome.browser.webapps; 5 package org.chromium.chrome.browser.webapps;
6 6
7 import android.content.Intent; 7 import android.content.Intent;
8 import android.graphics.Bitmap; 8 import android.graphics.Bitmap;
9 import android.graphics.Color; 9 import android.graphics.Color;
10 import android.graphics.drawable.Drawable; 10 import android.graphics.drawable.Drawable;
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 // Restore the data if necessary from the intent. 264 // Restore the data if necessary from the intent.
265 storage.updateFromShortcutIntent(intent); 265 storage.updateFromShortcutIntent(intent);
266 266
267 // A recent last used time is the indicator that the web app is still 267 // A recent last used time is the indicator that the web app is still
268 // present on the home screen, and enables sources such as notifications to 268 // present on the home screen, and enables sources such as notifications to
269 // launch web apps. Thus, we do not update the last used time when the web 269 // launch web apps. Thus, we do not update the last used time when the web
270 // app is not directly launched from the home screen, as this interferes 270 // app is not directly launched from the home screen, as this interferes
271 // with the heuristic. 271 // with the heuristic.
272 if (mWebappInfo.isLaunchedFromHomescreen()) { 272 if (mWebappInfo.isLaunchedFromHomescreen()) {
273 storage.updateLastUsedTime(); 273 storage.updateLastUsedTime();
274 storage.setLaunched();
275 } 274 }
276 275
277 // Retrieve the splash image if it exists. 276 // Retrieve the splash image if it exists.
278 storage.getSplashScreenImage(new WebappDataStorage.Fetch Callback<Bitmap>() { 277 storage.getSplashScreenImage(new WebappDataStorage.Fetch Callback<Bitmap>() {
279 @Override 278 @Override
280 public void onDataRetrieved(Bitmap splashImage) { 279 public void onDataRetrieved(Bitmap splashImage) {
281 initializeSplashScreenWidgets(backgroundColor, s plashImage); 280 initializeSplashScreenWidgets(backgroundColor, s plashImage);
282 } 281 }
283 }); 282 });
284 } 283 }
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 return visible; 593 return visible;
595 } 594 }
596 595
597 // We're temporarily disable CS on webapp since there are some issues. (http ://crbug.com/471950) 596 // We're temporarily disable CS on webapp since there are some issues. (http ://crbug.com/471950)
598 // TODO(changwan): re-enable it once the issues are resolved. 597 // TODO(changwan): re-enable it once the issues are resolved.
599 @Override 598 @Override
600 protected boolean isContextualSearchAllowed() { 599 protected boolean isContextualSearchAllowed() {
601 return false; 600 return false;
602 } 601 }
603 } 602 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698