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; |
(...skipping 17 matching lines...) Expand all Loading... |
28 */ | 28 */ |
29 boolean willChromeHandleIntent(Intent intent); | 29 boolean willChromeHandleIntent(Intent intent); |
30 | 30 |
31 /** | 31 /** |
32 * Search for intent handlers that are specific to this URL aka, specialized
apps like | 32 * Search for intent handlers that are specific to this URL aka, specialized
apps like |
33 * google maps or youtube | 33 * google maps or youtube |
34 */ | 34 */ |
35 boolean isSpecializedHandlerAvailable(List<ResolveInfo> intent); | 35 boolean isSpecializedHandlerAvailable(List<ResolveInfo> intent); |
36 | 36 |
37 /** | 37 /** |
| 38 * Returns the number of specialized intent handlers in {@params infos}. Spe
cialized intent |
| 39 * handlers are intent handlers which handle only a few URLs (e.g. google ma
ps or youtube). |
| 40 */ |
| 41 int countSpecializedHandlers(List<ResolveInfo> infos); |
| 42 |
| 43 /** |
| 44 * Returns the package name of the first valid WebAPK in {@link infos}. |
| 45 * @param infos ResolveInfos to search. |
| 46 * @return The package name of the first valid WebAPK. Null if no valid WebA
PK was found. |
| 47 */ |
| 48 public String findValidWebApkPackageName(List<ResolveInfo> infos); |
| 49 |
| 50 /** |
38 * Get the name of the package of the currently running activity so that inc
oming intents | 51 * Get the name of the package of the currently running activity so that inc
oming intents |
39 * can be identified as originating from this activity. | 52 * can be identified as originating from this activity. |
40 */ | 53 */ |
41 String getPackageName(); | 54 String getPackageName(); |
42 | 55 |
43 /** | 56 /** |
44 * Start an activity for the intent. Used for intents that must be handled e
xternally. | 57 * Start an activity for the intent. Used for intents that must be handled e
xternally. |
45 */ | 58 */ |
46 void startActivity(Intent intent); | 59 void startActivity(Intent intent); |
47 | 60 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 /** | 119 /** |
107 * @return Default SMS application's package name. Null if there isn't any. | 120 * @return Default SMS application's package name. Null if there isn't any. |
108 */ | 121 */ |
109 String getDefaultSmsPackageName(); | 122 String getDefaultSmsPackageName(); |
110 | 123 |
111 /** | 124 /** |
112 * @return Whether the URL is a file download. | 125 * @return Whether the URL is a file download. |
113 */ | 126 */ |
114 boolean isPdfDownload(String url); | 127 boolean isPdfDownload(String url); |
115 } | 128 } |
OLD | NEW |