| 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.Context; | 7 import android.content.Context; |
| 8 import android.content.Intent; | 8 import android.content.Intent; |
| 9 import android.net.Uri; | 9 import android.net.Uri; |
| 10 import android.os.Bundle; | 10 import android.os.Bundle; |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 intent.setAction(Intent.ACTION_MAIN); | 320 intent.setAction(Intent.ACTION_MAIN); |
| 321 intent.setPackage(mActivity.getPackageName()); | 321 intent.setPackage(mActivity.getPackageName()); |
| 322 intent.putExtra(ChromeLauncherActivity.EXTRA_BRING_WEBAPP_TO_FRONT,
true); | 322 intent.putExtra(ChromeLauncherActivity.EXTRA_BRING_WEBAPP_TO_FRONT,
true); |
| 323 | 323 |
| 324 intent.putExtra(ShortcutHelper.EXTRA_ICON, webAppInfo.getEncodedIcon
()); | 324 intent.putExtra(ShortcutHelper.EXTRA_ICON, webAppInfo.getEncodedIcon
()); |
| 325 intent.putExtra(ShortcutHelper.EXTRA_ID, webAppInfo.id()); | 325 intent.putExtra(ShortcutHelper.EXTRA_ID, webAppInfo.id()); |
| 326 intent.putExtra(ShortcutHelper.EXTRA_URL, url); | 326 intent.putExtra(ShortcutHelper.EXTRA_URL, url); |
| 327 intent.putExtra(ShortcutHelper.EXTRA_TITLE, webAppInfo.title()); | 327 intent.putExtra(ShortcutHelper.EXTRA_TITLE, webAppInfo.title()); |
| 328 intent.putExtra(ShortcutHelper.EXTRA_ORIENTATION, webAppInfo.orienta
tion()); | 328 intent.putExtra(ShortcutHelper.EXTRA_ORIENTATION, webAppInfo.orienta
tion()); |
| 329 intent.putExtra(ShortcutHelper.EXTRA_MAC, ShortcutHelper.getEncodedM
ac(mActivity, url)); | 329 intent.putExtra(ShortcutHelper.EXTRA_MAC, ShortcutHelper.getEncodedM
ac(mActivity, url)); |
| 330 intent.putExtra(ShortcutHelper.EXTRA_SOURCE, webAppInfo.source()); |
| 330 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); | 331 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); |
| 331 | 332 |
| 332 getApplicationContext().startActivity(intent); | 333 getApplicationContext().startActivity(intent); |
| 333 } | 334 } |
| 334 } | 335 } |
| 335 } | 336 } |
| OLD | NEW |