| 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.externalnav; | 5 package org.chromium.chrome.browser.externalnav; |
| 6 | 6 |
| 7 import android.content.Intent; | 7 import android.content.Intent; |
| 8 import android.content.pm.ResolveInfo; | 8 import android.content.pm.ResolveInfo; |
| 9 | 9 |
| 10 import org.chromium.chrome.browser.externalnav.ExternalNavigationHandler.Overrid
eUrlLoadingResult; | 10 import org.chromium.chrome.browser.externalnav.ExternalNavigationHandler.Overrid
eUrlLoadingResult; |
| 11 import org.chromium.chrome.browser.tab.Tab; | 11 import org.chromium.chrome.browser.tab.Tab; |
| 12 | 12 |
| 13 import java.util.List; | 13 import java.util.List; |
| 14 import java.util.Set; |
| 14 | 15 |
| 15 /** | 16 /** |
| 16 * A delegate for the class responsible for navigating to external applications
from Chrome. Used | 17 * A delegate for the class responsible for navigating to external applications
from Chrome. Used |
| 17 * by {@link ExternalNavigationHandler}. | 18 * by {@link ExternalNavigationHandler}. |
| 18 */ | 19 */ |
| 19 interface ExternalNavigationDelegate { | 20 interface ExternalNavigationDelegate { |
| 20 /** | 21 /** |
| 21 * Get the list of component name of activities which can resolve |intent|. | 22 * Get the list of component name of activities which can resolve |intent|. |
| 22 */ | 23 */ |
| 23 List<ResolveInfo> queryIntentActivities(Intent intent); | 24 List<ResolveInfo> queryIntentActivities(Intent intent); |
| 24 | 25 |
| 25 /** | 26 /** |
| 27 * Get all sha256 fingerprints of signature from pkgName or null on failure. |
| 28 */ |
| 29 Set<String> getPackageSHA256Fingerprints(String pkgName); |
| 30 |
| 31 /** |
| 26 * Determine if Chrome is the default or only handler for a given intent. If
true, Chrome | 32 * Determine if Chrome is the default or only handler for a given intent. If
true, Chrome |
| 27 * will handle the intent when started. | 33 * will handle the intent when started. |
| 28 */ | 34 */ |
| 29 boolean willChromeHandleIntent(Intent intent); | 35 boolean willChromeHandleIntent(Intent intent); |
| 30 | 36 |
| 31 /** | 37 /** |
| 32 * Search for intent handlers that are specific to this URL aka, specialized
apps like | 38 * Search for intent handlers that are specific to this URL aka, specialized
apps like |
| 33 * google maps or youtube | 39 * google maps or youtube |
| 34 */ | 40 */ |
| 35 boolean isSpecializedHandlerAvailable(List<ResolveInfo> infos); | 41 boolean isSpecializedHandlerAvailable(List<ResolveInfo> infos); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 /** | 128 /** |
| 123 * @return Default SMS application's package name. Null if there isn't any. | 129 * @return Default SMS application's package name. Null if there isn't any. |
| 124 */ | 130 */ |
| 125 String getDefaultSmsPackageName(); | 131 String getDefaultSmsPackageName(); |
| 126 | 132 |
| 127 /** | 133 /** |
| 128 * @return Whether the URL is a file download. | 134 * @return Whether the URL is a file download. |
| 129 */ | 135 */ |
| 130 boolean isPdfDownload(String url); | 136 boolean isPdfDownload(String url); |
| 131 } | 137 } |
| OLD | NEW |