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 * Get the name of the package of the currently running activity so that inc oming intents | 38 * @return Package name of the browser associated with the currently running activity. |
Xi Han
2016/05/30 20:16:07
@return -> Returns?
| |
39 * can be identified as originating from this activity. | |
40 */ | 39 */ |
41 String getPackageName(); | 40 String getBrowserPackageName(); |
41 | |
42 /** | |
43 * @return Package name of the WebAPK associated with the currently running activity. Null if | |
Xi Han
2016/05/30 20:16:07
@return -> Returns?
| |
44 * there is no associated WebAPK. | |
45 */ | |
46 String getWebApkPackageName(); | |
42 | 47 |
43 /** | 48 /** |
44 * Start an activity for the intent. Used for intents that must be handled e xternally. | 49 * Start an activity for the intent. Used for intents that must be handled e xternally. |
45 */ | 50 */ |
46 void startActivity(Intent intent); | 51 void startActivity(Intent intent); |
47 | 52 |
48 /** | 53 /** |
49 * Start an activity for the intent. Used for intents that may be handled in ternally or | 54 * Start an activity for the intent. Used for intents that may be handled in ternally or |
50 * externally. If the user chooses to handle the intent internally, this rou tine must return | 55 * externally. If the user chooses to handle the intent internally, this rou tine must return |
51 * false. | 56 * false. |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
97 * Determine if the Chrome app is in the foreground. | 102 * Determine if the Chrome app is in the foreground. |
98 */ | 103 */ |
99 boolean isChromeAppInForeground(); | 104 boolean isChromeAppInForeground(); |
100 | 105 |
101 /** | 106 /** |
102 * Check if Chrome is running in document mode. | 107 * Check if Chrome is running in document mode. |
103 */ | 108 */ |
104 boolean isDocumentMode(); | 109 boolean isDocumentMode(); |
105 | 110 |
106 /** | 111 /** |
112 * Launches the url in a new Chrome tab. This is useful if the page is being shown in a WebAPK. | |
113 * @param url The URL that Chrome should navigate to. | |
114 */ | |
115 public void startChromeActivity(String url); | |
116 | |
117 /** | |
107 * @return Default SMS application's package name. Null if there isn't any. | 118 * @return Default SMS application's package name. Null if there isn't any. |
108 */ | 119 */ |
109 String getDefaultSmsPackageName(); | 120 String getDefaultSmsPackageName(); |
110 } | 121 } |
OLD | NEW |