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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java

Issue 2891583004: [Android] Fix 'open in browser' in CCT does not work for images in Google image search (Closed)
Patch Set: Set Intent directly sent to ChromeLaucherActivity. 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
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.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
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
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 }
OLDNEW
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698