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

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

Issue 2829943002: Redirecting off-origin navigations in PWAs to CCT. (Closed)
Patch Set: Merge 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
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.net.Uri; 9 import android.net.Uri;
10 import android.text.TextUtils; 10 import android.text.TextUtils;
11 11
12 import org.chromium.base.Log; 12 import org.chromium.base.Log;
13 import org.chromium.base.VisibleForTesting;
13 import org.chromium.blink_public.platform.WebDisplayMode; 14 import org.chromium.blink_public.platform.WebDisplayMode;
14 import org.chromium.chrome.browser.ShortcutHelper; 15 import org.chromium.chrome.browser.ShortcutHelper;
15 import org.chromium.chrome.browser.ShortcutSource; 16 import org.chromium.chrome.browser.ShortcutSource;
16 import org.chromium.chrome.browser.util.IntentUtils; 17 import org.chromium.chrome.browser.util.IntentUtils;
17 import org.chromium.content_public.common.ScreenOrientationValues; 18 import org.chromium.content_public.common.ScreenOrientationValues;
18 19
19 /** 20 /**
20 * Stores info about a web app. 21 * Stores info about a web app.
21 */ 22 */
22 public class WebappInfo { 23 public class WebappInfo {
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 } 318 }
318 319
319 /** 320 /**
320 * Returns true if the WebappInfo was created for an Intent fired from a lau ncher shortcut (as 321 * Returns true if the WebappInfo was created for an Intent fired from a lau ncher shortcut (as
321 * opposed to an intent from a push notification or other internal source). 322 * opposed to an intent from a push notification or other internal source).
322 */ 323 */
323 public boolean isLaunchedFromHomescreen() { 324 public boolean isLaunchedFromHomescreen() {
324 int source = source(); 325 int source = source();
325 return source != ShortcutSource.NOTIFICATION && source != ShortcutSource .EXTERNAL_INTENT; 326 return source != ShortcutSource.NOTIFICATION && source != ShortcutSource .EXTERNAL_INTENT;
326 } 327 }
328
329 @VisibleForTesting
330 void setScopeForTest(String scope) {
331 mScopeUri = Uri.parse(scope);
332 }
327 } 333 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698