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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java

Issue 2359363004: Add a button to OIB to launch an instant app if it exists. (Closed)
Patch Set: Created 4 years, 2 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
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.document; 5 package org.chromium.chrome.browser.document;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.app.Activity; 8 import android.app.Activity;
9 import android.app.Notification; 9 import android.app.Notification;
10 import android.app.SearchManager; 10 import android.app.SearchManager;
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 196
197 // The notification settings cog on the flipped side of Notifications an d in the Android 197 // The notification settings cog on the flipped side of Notifications an d in the Android
198 // Settings "App Notifications" view will open us with a specific catego ry. 198 // Settings "App Notifications" view will open us with a specific catego ry.
199 if (intent.hasCategory(Notification.INTENT_CATEGORY_NOTIFICATION_PREFERE NCES)) { 199 if (intent.hasCategory(Notification.INTENT_CATEGORY_NOTIFICATION_PREFERE NCES)) {
200 NotificationPlatformBridge.launchNotificationPreferences(this, getIn tent()); 200 NotificationPlatformBridge.launchNotificationPreferences(this, getIn tent());
201 finish(); 201 finish();
202 return; 202 return;
203 } 203 }
204 204
205 // Check if we should launch an Instant App to handle the intent. 205 // Check if we should launch an Instant App to handle the intent.
206 ChromeApplication application = (ChromeApplication) getApplication(); 206 if (InstantAppsHandler.getInstance().handleIncomingIntent(
207 if (InstantAppsHandler.getInstance(application).handleIncomingIntent(
208 this, intent, mIsCustomTabIntent)) { 207 this, intent, mIsCustomTabIntent)) {
Maria 2016/09/26 17:36:25 does this now fit on the previous line?
Ted C 2016/09/26 18:05:04 Alas no, 103 chars
209 finish(); 208 finish();
210 return; 209 return;
211 } 210 }
212 211
213 // Check if we should launch the ChromeTabbedActivity. 212 // Check if we should launch the ChromeTabbedActivity.
214 if (!mIsCustomTabIntent && !FeatureUtilities.isDocumentMode(this)) { 213 if (!mIsCustomTabIntent && !FeatureUtilities.isDocumentMode(this)) {
215 boolean checkedFre = false; 214 boolean checkedFre = false;
216 if (CommandLine.getInstance().hasSwitch( 215 if (CommandLine.getInstance().hasSwitch(
217 ChromeSwitches.ENABLE_LIGHTWEIGHT_FIRST_RUN_EXPERIENCE)) { 216 ChromeSwitches.ENABLE_LIGHTWEIGHT_FIRST_RUN_EXPERIENCE)) {
218 // Launch the First Run Experience for VIEW Intents with URLs be fore launching 217 // Launch the First Run Experience for VIEW Intents with URLs be fore launching
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 IntentHandler.ExternalAppId source = 583 IntentHandler.ExternalAppId source =
585 IntentHandler.determineExternalIntentSource(getPackageName(), in tent); 584 IntentHandler.determineExternalIntentSource(getPackageName(), in tent);
586 if (intent.getPackage() == null && source != IntentHandler.ExternalAppId .CHROME) { 585 if (intent.getPackage() == null && source != IntentHandler.ExternalAppId .CHROME) {
587 int flagsOfInterest = Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_AC TIVITY_NEW_DOCUMENT; 586 int flagsOfInterest = Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_AC TIVITY_NEW_DOCUMENT;
588 int maskedFlags = intent.getFlags() & flagsOfInterest; 587 int maskedFlags = intent.getFlags() & flagsOfInterest;
589 sIntentFlagsHistogram.record(maskedFlags); 588 sIntentFlagsHistogram.record(maskedFlags);
590 } 589 }
591 MediaNotificationUma.recordClickSource(intent); 590 MediaNotificationUma.recordClickSource(intent);
592 } 591 }
593 } 592 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698