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.customtabs; | 5 package org.chromium.chrome.browser.customtabs; |
| 6 | 6 |
| 7 import android.app.Activity; | 7 import android.app.Activity; |
| 8 import android.app.Instrumentation; | 8 import android.app.Instrumentation; |
| 9 import android.content.ComponentName; | 9 import android.content.ComponentName; |
| 10 import android.content.Intent; | 10 import android.content.Intent; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 73 | 73 |
| 74 /** | 74 /** |
| 75 * Creates the simplest intent that is sufficient to let {@link ChromeLaunch erActivity} launch | 75 * Creates the simplest intent that is sufficient to let {@link ChromeLaunch erActivity} launch |
| 76 * the {@link CustomTabActivity}. | 76 * the {@link CustomTabActivity}. |
| 77 */ | 77 */ |
| 78 protected Intent createMinimalCustomTabIntent(String url) { | 78 protected Intent createMinimalCustomTabIntent(String url) { |
| 79 Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); | 79 Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); |
| 80 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); | 80 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); |
| 81 intent.setComponent(new ComponentName(getInstrumentation().getTargetCont ext(), | 81 intent.setComponent(new ComponentName(getInstrumentation().getTargetCont ext(), |
| 82 ChromeLauncherActivity.class)); | 82 ChromeLauncherActivity.class)); |
| 83 intent.putExtra(CustomTabIntentDataProvider.EXTRA_CUSTOM_TABS_SESSION_ID , -1); | |
|
Yusuf
2015/07/10 16:42:00
Do we not need to add the SESSION EXTRA still?
Benoit L
2015/07/10 16:47:06
Sorry, missed that one.
No, it is allowed to have
Benoit L
2015/07/10 17:19:21
Done.
| |
| 84 return intent; | 83 return intent; |
| 85 } | 84 } |
| 86 } | 85 } |
| OLD | NEW |