Chromium Code Reviews| 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 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; |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 187 } | 187 } |
| 188 | 188 |
| 189 public String id() { | 189 public String id() { |
| 190 return mId; | 190 return mId; |
| 191 } | 191 } |
| 192 | 192 |
| 193 public Uri uri() { | 193 public Uri uri() { |
| 194 return mUri; | 194 return mUri; |
| 195 } | 195 } |
| 196 | 196 |
| 197 /** | |
| 198 * Whether the webapp should be navigated to {@link uri()} if the webapp is already open when | |
| 199 * Chrome receives a ACTION_START_WEBAPP intent. | |
| 200 */ | |
| 201 public boolean shouldNavigateIfAlreadyRunning() { | |
|
dominickn
2017/03/21 02:09:33
shouldForceNavigation()
| |
| 202 return false; | |
| 203 } | |
| 204 | |
| 197 public Uri scopeUri() { | 205 public Uri scopeUri() { |
| 198 return mScopeUri; | 206 return mScopeUri; |
| 199 } | 207 } |
| 200 | 208 |
| 201 public String name() { | 209 public String name() { |
| 202 return mName; | 210 return mName; |
| 203 } | 211 } |
| 204 | 212 |
| 205 public String shortName() { | 213 public String shortName() { |
| 206 return mShortName; | 214 return mShortName; |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 305 } | 313 } |
| 306 | 314 |
| 307 /** | 315 /** |
| 308 * Returns true if the WebappInfo was created for an Intent fired from a lau ncher shortcut (as | 316 * Returns true if the WebappInfo was created for an Intent fired from a lau ncher shortcut (as |
| 309 * opposed to an intent from a push notification or other internal source). | 317 * opposed to an intent from a push notification or other internal source). |
| 310 */ | 318 */ |
| 311 public boolean isLaunchedFromHomescreen() { | 319 public boolean isLaunchedFromHomescreen() { |
| 312 return source() != ShortcutSource.NOTIFICATION; | 320 return source() != ShortcutSource.NOTIFICATION; |
| 313 } | 321 } |
| 314 } | 322 } |
| OLD | NEW |