| 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.tab; | 5 package org.chromium.chrome.browser.tab; |
| 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.MailTo; | 9 import android.net.MailTo; |
| 10 import android.net.Uri; | 10 import android.net.Uri; |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 if (context == null) context = mTab.getApplicationContext(); | 246 if (context == null) context = mTab.getApplicationContext(); |
| 247 context.startActivity(chromeIntent); | 247 context.startActivity(chromeIntent); |
| 248 activityStarted = true; | 248 activityStarted = true; |
| 249 } | 249 } |
| 250 } | 250 } |
| 251 | 251 |
| 252 @Override | 252 @Override |
| 253 public void onOpenInNewChromeTabFromCCT(String linkUrl, boolean isIncognito)
{ | 253 public void onOpenInNewChromeTabFromCCT(String linkUrl, boolean isIncognito)
{ |
| 254 Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(linkUrl)); | 254 Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(linkUrl)); |
| 255 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); | 255 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); |
| 256 intent.setPackage(mTab.getApplicationContext().getPackageName()); | 256 intent.setClass(mTab.getApplicationContext(), ChromeLauncherActivity.cla
ss); |
| 257 intent.putExtra(ChromeLauncherActivity.EXTRA_IS_ALLOWED_TO_RETURN_TO_PAR
ENT, false); | 257 intent.putExtra(ChromeLauncherActivity.EXTRA_IS_ALLOWED_TO_RETURN_TO_PAR
ENT, false); |
| 258 if (isIncognito) { | 258 if (isIncognito) { |
| 259 intent.putExtra(IntentHandler.EXTRA_OPEN_NEW_INCOGNITO_TAB, true); | 259 intent.putExtra(IntentHandler.EXTRA_OPEN_NEW_INCOGNITO_TAB, true); |
| 260 intent.putExtra( | 260 intent.putExtra( |
| 261 Browser.EXTRA_APPLICATION_ID, mTab.getApplicationContext().g
etPackageName()); | 261 Browser.EXTRA_APPLICATION_ID, mTab.getApplicationContext().g
etPackageName()); |
| 262 IntentHandler.addTrustedIntentExtras(intent); | 262 IntentHandler.addTrustedIntentExtras(intent); |
| 263 } | 263 } |
| 264 IntentUtils.safeStartActivity(mTab.getActivity(), intent); | 264 IntentUtils.safeStartActivity(mTab.getActivity(), intent); |
| 265 } | 265 } |
| 266 | 266 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 285 if (DataReductionProxySettings.getInstance().isDataReductionProxyEnabled
() | 285 if (DataReductionProxySettings.getInstance().isDataReductionProxyEnabled
() |
| 286 && url != null && !url.toLowerCase(Locale.US).startsWith( | 286 && url != null && !url.toLowerCase(Locale.US).startsWith( |
| 287 UrlConstants.HTTPS_URL_PREFIX) | 287 UrlConstants.HTTPS_URL_PREFIX) |
| 288 && !isIncognito()) { | 288 && !isIncognito()) { |
| 289 return true; | 289 return true; |
| 290 } | 290 } |
| 291 return false; | 291 return false; |
| 292 } | 292 } |
| 293 | 293 |
| 294 } | 294 } |
| OLD | NEW |